Tuesday, 6 April 2021

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?



from FileNotFoundError Selenium Stealth Python

No comments:

Post a Comment