pyinstaller not using qtmodern data

Viewed 90

When using the qtmoden library with python. It works fine when running the code in VS Code.

But after using pyinstaller, it doens't anymore. When opening teh generated .exe file, it states that it does not have access to files located in - C:\Users\MyUsername\AppData\Local\Programs\Python\Python37-32\Lib\site-packages\qtmodern\resources

When running the .exe aplication it errors stating: 
Traceback (most recent call last):
File "my_filename.py", line 262, in (this number differs depending on my app/code)
File "qtmodern\styles.py", line 70, in dark
File "qtmodern\styles.py", line 23, in _apply_base_theme
FileNotFoundError: [Errno 2] No such file or directory: " 'C:\sers\MyName\AppData\Local\Temp_MEI166802\qtmodern\resources/styles.qss'
[36020] failed to execute script my_filename

Anybody any idea how to get this fixed? How to make sure pyinstaller also takes these 2 stypes.py files into account?

I tried adding data with pyinstaller via the --add--data command and including paths with --paths command, But the error message stays the exact same.

0 Answers
Related