ModuleNotFoundError: No module named 'fake_useragent.data #23
Replies: 1 comment
-
It looks like an error with the import or the use of fake_useragent, sorry I never used pyinstaller |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I created an app with your api and when create exe file with pyinstaller and run de app it causes error.
`Unable to find local data/json file or could not parse the contents using importlib-resources. Try pkg-resource next.
Traceback (most recent call last):
File "fake_useragent\utils.py", line 21, in load
File "importlib_common.py", line 22, in files
File "importlib_common.py", line 66, in get_package
File "importlib_common.py", line 57, in resolve
File "importlib_init_.py", line 126, in import_module
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1004, in find_and_load_unlocked
ModuleNotFoundError: No module named 'fake_useragent.data'
Could not find local data/json file or could not parse the contents using pkg-resource.
Traceback (most recent call last):
File "fake_useragent\utils.py", line 21, in load
File "importlib_common.py", line 22, in files
File "importlib_common.py", line 66, in get_package
File "importlib_common.py", line 57, in resolve
File "importlib_init.py", line 126, in import_module
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1004, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'fake_useragent.data'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "fake_useragent\utils.py", line 36, in load
FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\darkuser\AppData\Local\Temp\_MEI255082\fake_useragent\data\browsers.json'
('Data list is empty', None)`
I added in the hidden imports:
'python-certifi-win32', 'UserAgent', 'fake_useragent', 'fake-useragent', 'howlongtobeatpy',
Thanks
Beta Was this translation helpful? Give feedback.
All reactions