Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while "Starting webdriver...": TypeError: expected str, bytes or os.PathLike object, not NoneType #69

Closed
darryllee opened this issue Apr 11, 2023 · 5 comments
Labels
dependency User has issues with the dependencies

Comments

@darryllee
Copy link

darryllee commented Apr 11, 2023

Description

I'm running Python 3.8.10 on Ubuntu 20.04 on an x86_64 box.

When installing requirements, I got these errors:

ERROR: selenium 4.8.0 has requirement certifi>=2021.10.8, but you'll have certifi 2019.11.28 which is incompatible.
ERROR: selenium 4.8.0 has requirement urllib3[socks]~=1.26, but you'll have urllib3 1.25.8 which is incompatible.

I successfully installed newer versions of these:

pip3 install urllib3==1.26
pip3 install certifi==2021.10.8

But when I run, I get a TypeError when it tries to start the webdriver:

$ python3 southwest.py -v MYCONFIRMATION Darryl Lee
2023-04-11 14:20:03 DEBUG MainProcess[log]: Initialized the application
2023-04-11 14:20:03 DEBUG MainProcess[main]: Called with 3 arguments
2023-04-11 14:20:03 DEBUG MainProcess[config]: Reading the configuration file
2023-04-11 14:20:03 DEBUG MainProcess[config]: No configuration file found. Using defaults
2023-04-11 14:20:03 DEBUG MainProcess[main]: Flight added through CLI arguments
2023-04-11 14:20:03 DEBUG MainProcess[main]: Monitoring 0 accounts and 1 flights
2023-04-11 14:20:03 DEBUG Process-1[flight_retriever]: Scheduling reservations for 1 flights
2023-04-11 14:20:03 DEBUG Process-1[checkin_scheduler]: No headers set. Refreshing...
2023-04-11 14:20:03 DEBUG Process-1[checkin_scheduler]: Refreshing headers for current session
2023-04-11 14:20:03 DEBUG Process-1[webdriver]: Starting webdriver for current session
Process Process-1:
Traceback (most recent call last):
  File "/usr/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap
    self.run()
  File "/usr/lib/python3.8/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/home/darryllee/workspace/auto-southwest-check-in/lib/flight_retriever.py", line 37, in schedule_reservations
    self.checkin_scheduler.schedule(confirmation_numbers)
  File "/home/darryllee/workspace/auto-southwest-check-in/lib/checkin_scheduler.py", line 36, in schedule
    self.refresh_headers()
  File "/home/darryllee/workspace/auto-southwest-check-in/lib/checkin_scheduler.py", line 48, in refresh_headers
    webdriver.set_headers()
  File "/home/darryllee/workspace/auto-southwest-check-in/lib/webdriver.py", line 60, in set_headers
    driver = self._get_driver()
  File "/home/darryllee/workspace/auto-southwest-check-in/lib/webdriver.py", line 140, in _get_driver
    driver = Chrome(
  File "/home/darryllee/.local/lib/python3.8/site-packages/seleniumwire/undetected_chromedriver/webdriver.py", line 61, in __init__
    super().__init__(*args, **kwargs)
  File "/home/darryllee/.local/lib/python3.8/site-packages/undetected_chromedriver/__init__.py", line 409, in __init__
    browser = subprocess.Popen(
  File "/usr/lib/python3.8/subprocess.py", line 858, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.8/subprocess.py", line 1585, in _execute_child
    and os.path.dirname(executable)
  File "/usr/lib/python3.8/posixpath.py", line 152, in dirname
    p = os.fspath(p)
TypeError: expected str, bytes or os.PathLike object, not NoneType

To Reproduce

  1. Install auto-southwest-check-in following directions
  2. Try to setup checkin with confirmation number and name

Expected Behavior

Script gets ready to check me in.

Version

Auto-Southwest Check-In v3.1

Additional context

No response

@darryllee darryllee added the bug Something isn't working label Apr 11, 2023
@jdholtz jdholtz added dependency User has issues with the dependencies and removed bug Something isn't working labels Apr 12, 2023
@jdholtz
Copy link
Owner

jdholtz commented Apr 12, 2023

Hi. Can you try installing urllib3==1.26.15 and certifi==2022.12.7? With those versions, I am able to successfully log in to my account.

And just to make sure, do you have Chromium-based browser installed (Google Chrome, Chromium, Brave, etc.)?

@darryllee
Copy link
Author

darryllee commented Apr 12, 2023 via email

@jdholtz
Copy link
Owner

jdholtz commented Apr 12, 2023

Where is the location of you Chrome and Chromedriver executables? It appears that it isn’t finding it.

@ryee-dev
Copy link

Reinstalling the latest version of Chrome fixed it for me.

@darryllee
Copy link
Author

I'm an idiot. Chromium wasn't installed. Sorry for the noise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependency User has issues with the dependencies
Projects
None yet
Development

No branches or pull requests

3 participants