irmen / Pyro5

Pyro 5 - Python remote objects
https://pyro5.readthedocs.io
MIT License
305 stars 36 forks source link

convert message data from bytearray to bytes in httpgateway wsgi app #23

Closed PhilReinhold closed 4 years ago

PhilReinhold commented 4 years ago

The http example was failing for me with the following:

File "C:\Users\pcreinhold\Miniconda3\lib\wsgiref\handlers.py", line 138, in run self.finish_response() File "C:\Users\pcreinhold\Miniconda3\lib\wsgiref\handlers.py", line 184, in finish_response self.write(data) File "C:\Users\pcreinhold\Miniconda3\lib\wsgiref\handlers.py", line 279, in write "write() argument must be a bytes instance"

It looks like the data being returned was a bytearray, not a bytes.

irmen commented 4 years ago

Strange, don't know why in your case the data is a bytearray. When I run this, it is bytes. Ah well, the change doesn't hurt.