Most likely your 'args' module is calling import with a bytes object and
not a string and that it's getting that far into the process before you hit
code that only works with strings (_os.listdir() returns bytes if you pass
a bytes argument to it).
At this point I would take the question to python
Hello list,
I am embedding a python 3.6 environment in another executable, which is
compiling and executing ok. However I get an error on Windows when I try
to import any module except sys:
Traceback (most recent call last):
File "args", line 1, in
File "", line 971, in _find_and_load