2021年4月4日星期日

FileNotFoundError Selenium Stealth Python

I am running selenium-stealth in Python 3.9.3 on MacOS.

When I build to an app using PyInstaller ( pyinstaller --noconfirm --onefile --console --hidden-import "cmath" "/Users/name/Downloads/AmazonSellerCentral/main.py") I get the following error:

Traceback (most recent call last):    File "main.py", line 141, in <module>    File "main.py", line 77, in create_driver    File "selenium_stealth/__init__.py", line 45, in stealth    File "selenium_stealth/utils.py", line 8, in with_utils    File "pathlib.py", line 1255, in read_text    File "pathlib.py", line 1241, in open    File "pathlib.py", line 1109, in _opener  FileNotFoundError: [Errno 2] No such file or directory: '/var/folders/7z/3spcsmdx5n344dh0fb5j0hl40000gn/T/_MEIqfmicz/selenium_stealth/js/utils.js'  

.

However, simply running python3 main.py works fine.

Reinstalling selenium-stealth did nothing, I'm unsure what I can try to fix/change from here?

https://stackoverflow.com/questions/66924822/filenotfounderror-selenium-stealth-python April 03, 2021 at 04:23AM

没有评论:

发表评论