Skip to content

Unicode 'invalid start byte' error sometimes #201

@ghjm

Description

@ghjm

Tracebacks similar to the following are produced intermittently while performing receptor operations:

Traceback (most recent call last):
  File "/home/graham/git/receptor/receptor/connection/base.py", line 62, in receive
    await self.buf.put(msg)
  File "/home/graham/git/receptor/receptor/messages/framed.py", line 245, in put
    await self.consume(data)
  File "/home/graham/git/receptor/receptor/messages/framed.py", line 267, in consume
    await self.finish()
  File "/home/graham/git/receptor/receptor/messages/framed.py", line 283, in finish
    FramedMessage(msg_id=self.current_frame.msg_id, header=json.load(self.bb))
  File "/usr/lib64/python3.7/json/__init__.py", line 296, in load
    parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
  File "/usr/lib64/python3.7/json/__init__.py", line 343, in loads
    s = s.decode(detect_encoding(s), 'surrogatepass')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8c in position 4080: invalid start byte

I don't have a reliable reproducer yet but it seems to happen more often when there are a larger number of communicating peers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions