Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Unicode 'invalid start byte' error sometimes #201

Open
ghjm opened this issue Apr 8, 2020 · 3 comments
Open

Unicode 'invalid start byte' error sometimes #201

ghjm opened this issue Apr 8, 2020 · 3 comments
Labels
bug Something isn't working
Milestone

Comments

@ghjm
Copy link
Contributor

ghjm commented Apr 8, 2020

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.

@jhjaggars
Copy link
Member

@ghjm
Copy link
Contributor Author

ghjm commented Apr 8, 2020

Is this as simple as changing ensure_future to wait_for? Or is there more to it?

@jhjaggars
Copy link
Member

It used to be await.

I changed it due to high latency, but didn't consider out of order messages (duh).

@ghjm ghjm added the bug Something isn't working label Apr 21, 2020
@matburt matburt added this to the 1.0 Release milestone May 13, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants