-
Notifications
You must be signed in to change notification settings - Fork 118
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
Fix for "TypeError: write() argument must be str, not bytes" on Python 3.8+ #31
base: master
Are you sure you want to change the base?
Conversation
…n 3.8 As the output file is created for writing text and lxml raw generates bytes objects an error is thrown. Opening the file in binary mode solves the issue.
cool! LGTM |
Just confirmed this patch as a solution for the bug. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fixes generation on Python 3.10
+1 for merging this @tjfontaine |
Can confirm it as an solution for Python 3.6.8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
works for me, with python 3.9.2
@tjfontaine @superna9999 @rchenzheng any chance you could merge this, please? |
Unfortunately I do not have write access. |
works for me, please merge to main |
As the output file is created for writing text and lxml raw generates bytes objects an error is thrown.
Opening the file in binary mode solves the issue.