TinderBotz: AttributeError: 'Session' object has no attribute 'started'
Hi I cant seem to fix this error. It suddenly stopped working, same error on new PC. Here is the full terminal output. Updating my Chrome didnt fix the problem as normal. Here is the specific part maybe thats going wrong: “ValueError: There is no such driver by url https://chromedriver.storage.googleapis.com/LATEST_RELEASE_118.0.5993” I think this shows it cant download the right driver so just doesnt start. Any fixes? Thanks
PS C:\Users\Dean\Documents\TinderBotz-1.6> py quickstart.py
C:\Users\Dean\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\chromium\options.py:134: UserWarning: Manipulating w3c setting can have unintended consequences.
warnings.warn(UserWarning(“Manipulating w3c setting can have unintended consequences.”))
Getting ChromeDriver …
Traceback (most recent call last):
File “C:\Users\Dean\Documents\TinderBotz-1.6\quickstart.py”, line 10, in <module>
session = Session()
^^^^^^^^^
File “C:\Users\Dean\Documents\TinderBotz-1.6\tinderbotz\session.py”, line 87, in init
self.browser = webdriver.Chrome(ChromeDriverManager().install(), options=options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\Dean\AppData\Local\Programs\Python\Python311\Lib\site-packages\webdriver_manager\chrome.py”, line 39, in install
driver_path = self._get_driver_path(self.driver)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\Dean\AppData\Local\Programs\Python\Python311\Lib\site-packages\webdriver_manager\core\manager.py”, line 30, in _get_driver_path
file = self._download_manager.download_file(driver.get_driver_download_url())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\Dean\AppData\Local\Programs\Python\Python311\Lib\site-packages\webdriver_manager\drivers\chrome.py”, line 40, in get_driver_download_url
driver_version_to_download = self.get_driver_version_to_download()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\Dean\AppData\Local\Programs\Python\Python311\Lib\site-packages\webdriver_manager\core\driver.py”, line 51, in get_driver_version_to_download
self._driver_to_download_version = self._version if self._version not in (None, “latest”) else self.get_latest_release_version()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\Dean\AppData\Local\Programs\Python\Python311\Lib\site-packages\webdriver_manager\drivers\chrome.py”, line 62, in get_latest_release_version
resp = self._http_client.get(url=latest_release_url)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\Dean\AppData\Local\Programs\Python\Python311\Lib\site-packages\webdriver_manager\core\http.py”, line 37, in get
self.validate_response(resp)
File “C:\Users\Dean\AppData\Local\Programs\Python\Python311\Lib\site-packages\webdriver_manager\core\http.py”, line 16, in validate_response
raise ValueError(f"There is no such driver by url {resp.url}")
ValueError: There is no such driver by url https://chromedriver.storage.googleapis.com/LATEST_RELEASE_118.0.5993
/==============\
| Tinderbotz |
|---|
| duration: 0 |
| like: 0 |
| dislike: 0 |
| superlike: 0 |
| ==============/ |
Exception ignored in atexit callback: <function Session.init.<locals>.cleanup at 0x0000017CF43F04A0> Traceback (most recent call last): File “C:\Users\Dean\Documents\TinderBotz-1.6\tinderbotz\session.py”, line 65, in cleanup print(“Started session: {}”.format(self.started)) ^^^^^^^^^^^^ AttributeError: ‘Session’ object has no attribute ‘started’ PS C:\Users\Dean\Documents\TinderBotz-1.6>
About this issue
- Original URL
- State: open
- Created 9 months ago
- Reactions: 1
- Comments: 20
The short answer is using pip: https://packaging.python.org/en/latest/tutorials/installing-packages/ pip uninstall selenium pip install selenium==4.12 It seems you are new into python. It may be helpful if you use Pycharm (or another IDE) to create a virtual environment with the requirements.txt of this project and then select the package versions graphically. Im using Python 3.11 by the way if that helps
edit: @Lowell130 @thebluecrusader A small info that may help. When the error occurs and updates are not helping, try to delete everything in the folder “chrome_profile” and then start the bot again.
I sometimes got this problem when Chrome had an Update / chromedriver update was late or there was an error in an import (selenium for example). When I get this error I normally let chrome search for updates and if that doesnt work I wait for a day or two. Then the magic happens and mostly it works again 😃