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
Problem: when importing a package with pyimport I do get a UnicodeDecodeError as python is trying to read utf-8 encoded file using ascii codec. The import works without any problem if I run it directly in the python repl.
I've found that sys.flags.utf8_mode are different in these two cases, when calling from PythonCall this flag is always 0. Further, I've found no way to manipulate this flag. Setting ENV["PYTHONUTF8"]=1 has no effect.
I'm I missing something? How can I get this to work?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Problem: when importing a package with
pyimportI do get aUnicodeDecodeErroras python is trying to read utf-8 encoded file using ascii codec. The import works without any problem if I run it directly in the python repl.I've found that
sys.flags.utf8_modeare different in these two cases, when calling from PythonCall this flag is always 0. Further, I've found no way to manipulate this flag. SettingENV["PYTHONUTF8"]=1has no effect.I'm I missing something? How can I get this to work?
Beta Was this translation helpful? Give feedback.
All reactions