I got a similar problem, although I was using --onedir option of pyinstaller. In my case the error was due to unicode characters in the directory name. Copying the onnx model to a temp file solved the problem. It works even when the Windows username contains unicode.