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
i have special characters in files I am trying to copy and want to keep them as such.
But ascii is hardcoded as shown below in the self._fp.write(s.encode('ascii', 'surrogateescape'))
Please help
File "/usr/local/lib/python3.8/site-packages/googleapiclient/discovery.py", line 1104, in method
g.flatten(msgRoot, unixfrom=False)
File "/usr/lib64/python3.8/email/generator.py", line 116, in flatten
self._write(msg)
File "/usr/lib64/python3.8/email/generator.py", line 181, in _write
self._dispatch(msg)
File "/usr/lib64/python3.8/email/generator.py", line 218, in _dispatch
meth(msg)
File "/usr/lib64/python3.8/email/generator.py", line 276, in _handle_multipart
g.flatten(part, unixfrom=False, linesep=self._NL)
File "/usr/lib64/python3.8/email/generator.py", line 116, in flatten
self._write(msg)
File "/usr/lib64/python3.8/email/generator.py", line 181, in _write
self._dispatch(msg)
File "/usr/lib64/python3.8/email/generator.py", line 218, in _dispatch
meth(msg)
File "/usr/lib64/python3.8/email/generator.py", line 436, in _handle_text
super(BytesGenerator,self)._handle_text(msg)
File "/usr/lib64/python3.8/email/generator.py", line 253, in _handle_text
self._write_lines(payload)
File "/usr/lib64/python3.8/email/generator.py", line 410, in write
self._fp.write(s.encode('ascii', 'surrogateescape'))
UnicodeEncodeError: 'ascii' codec can't encode character '\xf1' in position 1: ordinal not in range(128)
google-api-python-client==1.12.11
The text was updated successfully, but these errors were encountered:
i have special characters in files I am trying to copy and want to keep them as such.
But ascii is hardcoded as shown below in the self._fp.write(s.encode('ascii', 'surrogateescape'))
Please help
google-api-python-client==1.12.11
The text was updated successfully, but these errors were encountered: