Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Fixed file upload error in python3 #26

Merged
merged 5 commits into from
Aug 12, 2017

Conversation

mmasashi
Copy link
Contributor

I got the following error on file upload when running the server process in python3.

  File "....../rest_framework_proxy/utils.py", line 61, in build_multipart_header
    return b'\r\n'.join(output)
TypeError: sequence item 0: expected a bytes-like object, str found

This happens because output is not binary string. I made changes to encode string into binary string in the utils module.

@codecov-io
Copy link

codecov-io commented Aug 12, 2017

Codecov Report

Merging #26 into master will increase coverage by 17.33%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master      #26       +/-   ##
===========================================
+ Coverage   50.22%   67.55%   +17.33%     
===========================================
  Files           5        5               
  Lines         225      225               
===========================================
+ Hits          113      152       +39     
+ Misses        112       73       -39
Impacted Files Coverage Δ
rest_framework_proxy/utils.py 88.88% <100%> (+66.66%) ⬆️
rest_framework_proxy/views.py 71.11% <0%> (+6.66%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 624823b...421376f. Read the comment docs.

@eofs eofs merged commit 1fa51b1 into eofs:master Aug 12, 2017
@eofs
Copy link
Owner

eofs commented Aug 12, 2017

Thanks, merged! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants