eofs / django-rest-framework-proxy

Django Rest Framework Proxy views
138 stars 58 forks source link

MultiPart, file, got error "TypeError: sequence item 0: expected a bytes-like object, str found" #28

Open VDShark opened 6 years ago

VDShark commented 6 years ago

Hi there. Are you testing file proxying?

I'm faced with this error. I'm little diving in the problem, and found this place: rest_framework_proxy/utils.py:61

return b'\r\n'.join(output)

Maybe I don't understand something, but output contains strings => we got this error.

P.S. Also, there is something strange with package releases. In pypi actual version 1.6, but in this repo I see 1.4 as latest.

mirekys commented 5 years ago

Hi, I can confirm this error happening on Python 3.7 and DRF proxy 1.6 as you are trying to join string mode list with bytes. Should be encoded like in #26.

Shehab-Muhammad commented 5 years ago

there's no release for that fix! please fix this it's critical issue