You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 1, 2024. It is now read-only.
Catch the error TypeError: a bytes-like object is required, not 'str' by opening as 'w' instead of 'wb'and by specifying the lineterminator explicitly to remove white lines.
#DEL#with open(full_output_path, 'wb') as f:
#DEL# w = csv.DictWriter(f, fields)
with open(full_output_path, 'w') as f:
w = csv.DictWriter(f, fields, lineterminator='\n')
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
https://stackoverflow.com/questions/3828723/why-should-we-not-use-sys-setdefaultencodingutf-8-in-a-py-script
TypeError: a bytes-like object is required, not 'str'
by opening as 'w' instead of 'wb'and by specifying the lineterminator explicitly to remove white lines.The text was updated successfully, but these errors were encountered: