jdholtz / auto-southwest-check-in

A Python script that automatically checks in to your Southwest flight 24 hours beforehand.
GNU General Public License v3.0
463 stars 89 forks source link

PermissionError: [Errno 13] Permission denied: 'C:\\Users\\Admin\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python312\\site-packages\\seleniumbase\\drivers\\uc_driver.exe' #317

Closed ericlamus closed 1 week ago

ericlamus commented 2 weeks ago

Version

Auto-Southwest Check-In v8.1

Browser Version

Windows - Chromium

Description

This popped up the last few days. I'm using a Windows VM because it doesn't throw the "Bad Request 400/429" errors in Linux. I start up the script and it throws permission errors. I've verified the executable has permissions. I started the Command Prompt as "run as admin" as well.

I'm suspecting that it's throwing a permission error because uc_driver.exe is already started and the update is trying to clobber an active process.

To Reproduce

python3 southwest.py -v

Expected Behavior

No response

Relevant logs and program output

2024-11-07 20:29:09 DEBUG MainProcess[log:24]: Initialized the application
2024-11-07 20:29:09 DEBUG MainProcess[main:113]: Auto-Southwest Check-In v8.1
2024-11-07 20:29:09 DEBUG MainProcess[main:71]: Called with 0 arguments
2024-11-07 20:29:09 DEBUG MainProcess[config:143]: Initializing configuration file
2024-11-07 20:29:09 DEBUG MainProcess[config:172]: Reading the configuration file
2024-11-07 20:29:09 DEBUG MainProcess[config:185]: Reading configuration from environment variables
2024-11-07 20:29:09 DEBUG MainProcess[config:73]: Setting check fares to <CheckFaresOption.SAME_FLIGHT: 'same_flight'>
2024-11-07 20:29:09 DEBUG MainProcess[config:85]: Setting retrieval interval to 24 hours
2024-11-07 20:29:09 DEBUG MainProcess[config:120]: Setting notification level to <NotificationLevel.NOTICE: 1>
2024-11-07 20:29:09 DEBUG MainProcess[config:133]: Using 1 notification services
2024-11-07 20:29:09 DEBUG MainProcess[config:155]: Creating configurations for 2 accounts
2024-11-07 20:29:09 DEBUG MainProcess[config:162]: Creating configurations for 2 reservations
2024-11-07 20:29:09 INFO MainProcess[main:97]: Monitoring 2 accounts and 2 reservations

2024-11-07 20:29:10 DEBUG Process-1[reservation_monitor:65]: Acquiring lock...
2024-11-07 20:29:10 DEBUG Process-1[reservation_monitor:67]: Lock acquired
2024-11-07 20:29:10 DEBUG Process-1[reservation_monitor:205]: Retrieving reservations for account
2024-11-07 20:29:10 DEBUG Process-1[webdriver:130]: Starting webdriver for current session
2024-11-07 20:29:10 DEBUG Process-2[reservation_monitor:65]: Acquiring lock...
2024-11-07 20:29:10 DEBUG Process-3[reservation_monitor:65]: Acquiring lock...
2024-11-07 20:29:10 DEBUG Process-4[reservation_monitor:65]: Acquiring lock...

Warning: uc_driver update needed. Getting it now:

*** chromedriver to download = 130.0.6723.116 (Latest Stable)

Downloading chromedriver-win64.zip from:
https://storage.googleapis.com/chrome-for-testing-public/130.0.6723.116/win64/chromedriver-win64.zip ...
Download Complete!

Extracting ['chromedriver.exe'] from chromedriver-win64.zip ...
Process Process-1:
2024-11-07 20:29:12 DEBUG Process-2[reservation_monitor:67]: Lock acquired
2024-11-07 20:29:12 DEBUG Process-2[reservation_monitor:205]: Retrieving reservations for account
2024-11-07 20:29:12 DEBUG Process-2[webdriver:130]: Starting webdriver for current session
Traceback (most recent call last):
  File "C:\Users\Admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\seleniumbase\core\browser_launcher.py", line 3950, in get_local_driver
    sb_install.main(
  File "C:\Users\Admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\seleniumbase\console_scripts\sb_install.py", line 903, in main
    zip_ref.extract(zipinfo, downloads_folder)
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.2032.0_x64__qbz5n2kfra8p0\Lib\zipfile\__init__.py", line 1726, in extract
    return self._extract_member(member, path, pwd)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.2032.0_x64__qbz5n2kfra8p0\Lib\zipfile\__init__.py", line 1801, in _extract_member
    open(targetpath, "wb") as target:
    ^^^^^^^^^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: 'C:\\Users\\Admin\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python312\\site-packages\\seleniumbase\\drivers\\uc_driver.exe'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.2032.0_x64__qbz5n2kfra8p0\Lib\multiprocessing\process.py", line 314, in _bootstrap
    self.run()
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.2032.0_x64__qbz5n2kfra8p0\Lib\multiprocessing\process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Users\Admin\Documents\auto-southwest-check-in\lib\reservation_monitor.py", line 51, in monitor
    self._monitor()
  File "C:\Users\Admin\Documents\auto-southwest-check-in\lib\reservation_monitor.py", line 69, in _monitor
    should_exit = self._check()
                  ^^^^^^^^^^^^^
  File "C:\Users\Admin\Documents\auto-southwest-check-in\lib\reservation_monitor.py", line 187, in _check
    reservations, skip_scheduling = self._get_reservations()
                                    ^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Admin\Documents\auto-southwest-check-in\lib\reservation_monitor.py", line 209, in _get_reservations
    reservations = webdriver.get_reservations(self)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Admin\Documents\auto-southwest-check-in\lib\webdriver.py", line 101, in get_reservations
    driver = self._get_driver()
             ^^^^^^^^^^^^^^^^^^
  File "C:\Users\Admin\Documents\auto-southwest-check-in\lib\webdriver.py", line 143, in _get_driver
    driver = Driver(
             ^^^^^^^
  File "C:\Users\Admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\seleniumbase\plugins\driver_manager.py", line 583, in Driver
    driver = browser_launcher.get_driver(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\seleniumbase\core\browser_launcher.py", line 2339, in get_driver
    return get_local_driver(
           ^^^^^^^^^^^^^^^^^
  File "C:\Users\Admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\seleniumbase\core\browser_launcher.py", line 3960, in get_local_driver
    and int(use_version) > int(d_latest.split(".")[0])
        ^^^^^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: '130.0.6723.116'

Warning: uc_driver update needed. Getting it now:

*** chromedriver to download = 130.0.6723.116 (Latest Stable)

Downloading chromedriver-win64.zip from:
https://storage.googleapis.com/chrome-for-testing-public/130.0.6723.116/win64/chromedriver-win64.zip ...
Download Complete!

Extracting ['chromedriver.exe'] from chromedriver-win64.zip ...
Process Process-2:
2024-11-07 20:29:15 DEBUG Process-3[reservation_monitor:67]: Lock acquired
2024-11-07 20:29:15 DEBUG Process-3[checkin_scheduler:48]: Refreshing headers for current session
2024-11-07 20:29:15 DEBUG Process-3[webdriver:130]: Starting webdriver for current session
Traceback (most recent call last):
  File "C:\Users\Admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\seleniumbase\core\browser_launcher.py", line 3950, in get_local_driver
    sb_install.main(
  File "C:\Users\Admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\seleniumbase\console_scripts\sb_install.py", line 903, in main
    zip_ref.extract(zipinfo, downloads_folder)
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.2032.0_x64__qbz5n2kfra8p0\Lib\zipfile\__init__.py", line 1726, in extract
    return self._extract_member(member, path, pwd)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.2032.0_x64__qbz5n2kfra8p0\Lib\zipfile\__init__.py", line 1801, in _extract_member
    open(targetpath, "wb") as target:
    ^^^^^^^^^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: 'C:\\Users\\Admin\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python312\\site-packages\\seleniumbase\\drivers\\uc_driver.exe'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.2032.0_x64__qbz5n2kfra8p0\Lib\multiprocessing\process.py", line 314, in _bootstrap
    self.run()
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.2032.0_x64__qbz5n2kfra8p0\Lib\multiprocessing\process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Users\Admin\Documents\auto-southwest-check-in\lib\reservation_monitor.py", line 51, in monitor
    self._monitor()
  File "C:\Users\Admin\Documents\auto-southwest-check-in\lib\reservation_monitor.py", line 69, in _monitor
    should_exit = self._check()
                  ^^^^^^^^^^^^^
  File "C:\Users\Admin\Documents\auto-southwest-check-in\lib\reservation_monitor.py", line 187, in _check
    reservations, skip_scheduling = self._get_reservations()
                                    ^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Admin\Documents\auto-southwest-check-in\lib\reservation_monitor.py", line 209, in _get_reservations
    reservations = webdriver.get_reservations(self)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Admin\Documents\auto-southwest-check-in\lib\webdriver.py", line 101, in get_reservations
    driver = self._get_driver()
             ^^^^^^^^^^^^^^^^^^
  File "C:\Users\Admin\Documents\auto-southwest-check-in\lib\webdriver.py", line 143, in _get_driver
    driver = Driver(
             ^^^^^^^
  File "C:\Users\Admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\seleniumbase\plugins\driver_manager.py", line 583, in Driver
    driver = browser_launcher.get_driver(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\seleniumbase\core\browser_launcher.py", line 2339, in get_driver
    return get_local_driver(
           ^^^^^^^^^^^^^^^^^
  File "C:\Users\Admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\seleniumbase\core\browser_launcher.py", line 3960, in get_local_driver
    and int(use_version) > int(d_latest.split(".")[0])
        ^^^^^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: '130.0.6723.116'

Warning: uc_driver update needed. Getting it now:

*** chromedriver to download = 130.0.6723.116 (Latest Stable)

Downloading chromedriver-win64.zip from:
https://storage.googleapis.com/chrome-for-testing-public/130.0.6723.116/win64/chromedriver-win64.zip ...
Download Complete!

Extracting ['chromedriver.exe'] from chromedriver-win64.zip ...
Process Process-3:
2024-11-07 20:29:17 DEBUG Process-4[reservation_monitor:67]: Lock acquired
2024-11-07 20:29:17 DEBUG Process-4[checkin_scheduler:48]: Refreshing headers for current session
2024-11-07 20:29:17 DEBUG Process-4[webdriver:130]: Starting webdriver for current session
Traceback (most recent call last):
  File "C:\Users\Admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\seleniumbase\core\browser_launcher.py", line 3950, in get_local_driver
    sb_install.main(
  File "C:\Users\Admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\seleniumbase\console_scripts\sb_install.py", line 903, in main
    zip_ref.extract(zipinfo, downloads_folder)
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.2032.0_x64__qbz5n2kfra8p0\Lib\zipfile\__init__.py", line 1726, in extract
    return self._extract_member(member, path, pwd)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.2032.0_x64__qbz5n2kfra8p0\Lib\zipfile\__init__.py", line 1801, in _extract_member
    open(targetpath, "wb") as target:
    ^^^^^^^^^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: 'C:\\Users\\Admin\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python312\\site-packages\\seleniumbase\\drivers\\uc_driver.exe'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.2032.0_x64__qbz5n2kfra8p0\Lib\multiprocessing\process.py", line 314, in _bootstrap
    self.run()
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.2032.0_x64__qbz5n2kfra8p0\Lib\multiprocessing\process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Users\Admin\Documents\auto-southwest-check-in\lib\reservation_monitor.py", line 51, in monitor
    self._monitor()
  File "C:\Users\Admin\Documents\auto-southwest-check-in\lib\reservation_monitor.py", line 69, in _monitor
    should_exit = self._check()
                  ^^^^^^^^^^^^^
  File "C:\Users\Admin\Documents\auto-southwest-check-in\lib\reservation_monitor.py", line 90, in _check
    self.checkin_scheduler.refresh_headers()
  File "C:\Users\Admin\Documents\auto-southwest-check-in\lib\checkin_scheduler.py", line 50, in refresh_headers
    webdriver.set_headers()
  File "C:\Users\Admin\Documents\auto-southwest-check-in\lib\webdriver.py", line 86, in set_headers
    driver = self._get_driver()
             ^^^^^^^^^^^^^^^^^^
  File "C:\Users\Admin\Documents\auto-southwest-check-in\lib\webdriver.py", line 143, in _get_driver
    driver = Driver(
             ^^^^^^^
  File "C:\Users\Admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\seleniumbase\plugins\driver_manager.py", line 583, in Driver
    driver = browser_launcher.get_driver(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\seleniumbase\core\browser_launcher.py", line 2339, in get_driver
    return get_local_driver(
           ^^^^^^^^^^^^^^^^^
  File "C:\Users\Admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\seleniumbase\core\browser_launcher.py", line 3960, in get_local_driver
    and int(use_version) > int(d_latest.split(".")[0])
        ^^^^^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: '130.0.6723.116'

Warning: uc_driver update needed. Getting it now:

*** chromedriver to download = 130.0.6723.116 (Latest Stable)

Downloading chromedriver-win64.zip from:
https://storage.googleapis.com/chrome-for-testing-public/130.0.6723.116/win64/chromedriver-win64.zip ...
Download Complete!

Extracting ['chromedriver.exe'] from chromedriver-win64.zip ...
Process Process-4:
Traceback (most recent call last):
  File "C:\Users\Admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\seleniumbase\core\browser_launcher.py", line 3950, in get_local_driver
    sb_install.main(
  File "C:\Users\Admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\seleniumbase\console_scripts\sb_install.py", line 903, in main
    zip_ref.extract(zipinfo, downloads_folder)
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.2032.0_x64__qbz5n2kfra8p0\Lib\zipfile\__init__.py", line 1726, in extract
    return self._extract_member(member, path, pwd)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.2032.0_x64__qbz5n2kfra8p0\Lib\zipfile\__init__.py", line 1801, in _extract_member
    open(targetpath, "wb") as target:
    ^^^^^^^^^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: 'C:\\Users\\Admin\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python312\\site-packages\\seleniumbase\\drivers\\uc_driver.exe'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.2032.0_x64__qbz5n2kfra8p0\Lib\multiprocessing\process.py", line 314, in _bootstrap
    self.run()
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.2032.0_x64__qbz5n2kfra8p0\Lib\multiprocessing\process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Users\Admin\Documents\auto-southwest-check-in\lib\reservation_monitor.py", line 51, in monitor
    self._monitor()
  File "C:\Users\Admin\Documents\auto-southwest-check-in\lib\reservation_monitor.py", line 69, in _monitor
    should_exit = self._check()
                  ^^^^^^^^^^^^^
  File "C:\Users\Admin\Documents\auto-southwest-check-in\lib\reservation_monitor.py", line 90, in _check
    self.checkin_scheduler.refresh_headers()
  File "C:\Users\Admin\Documents\auto-southwest-check-in\lib\checkin_scheduler.py", line 50, in refresh_headers
    webdriver.set_headers()
  File "C:\Users\Admin\Documents\auto-southwest-check-in\lib\webdriver.py", line 86, in set_headers
    driver = self._get_driver()
             ^^^^^^^^^^^^^^^^^^
  File "C:\Users\Admin\Documents\auto-southwest-check-in\lib\webdriver.py", line 143, in _get_driver
    driver = Driver(
             ^^^^^^^
  File "C:\Users\Admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\seleniumbase\plugins\driver_manager.py", line 583, in Driver
    driver = browser_launcher.get_driver(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\seleniumbase\core\browser_launcher.py", line 2339, in get_driver
    return get_local_driver(
           ^^^^^^^^^^^^^^^^^
  File "C:\Users\Admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\seleniumbase\core\browser_launcher.py", line 3960, in get_local_driver
    and int(use_version) > int(d_latest.split(".")[0])
        ^^^^^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: '130.0.6723.116'

C:\Users\Admin\Documents\auto-southwest-check-in>

Additional context

No response

jdholtz commented 2 weeks ago

Thanks for reporting this issue. I don’t think you have upgraded the dependencies to their latest versions in v8.1 though. The line at the very end of the traceback is on line 3960 of its respective file, which is its location in SeleniumBase v4.29.9 but not v4.32.6 (the version v8.1 has it at). This SeleniumBase version has many upgrades/fixes to the driver, so that may be your problem.

Let me know if you’re still running into issues after upgrading (pip install -r requirements.txt).

ericlamus commented 2 weeks ago

DOH, I didn't think about that. I just ran pip install -r requirements.txt. Will keep you posted if there are anymore issues.