AnsonLai / TeslaServiceManualScraper

This script will download the Tesla Service Manual onto a local doc folder for offline access.
MIT License
65 stars 12 forks source link

Traceback issues with find_element return self.execute(Command.FIND_ELEMEN #12

Closed ZachSandhofer closed 2 years ago

ZachSandhofer commented 2 years ago

Using Selenium 4.2.0 with the latest scrape.py script. Seems like an Access Denied issue, kick out immediately after with below error. Script getting stuck on ModelS Electrical/Harness section 1710 (large quantity of images).

C:\Program Files\Python310\TeslaServiceManualScraper-master>py scrape.py C:\Program Files\Python310\TeslaServiceManualScraper-master\scrape.py:1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives from distutils.command.clean import clean

DevTools listening on ws://127.0.0.1:65188/devtools/browser/35abb965-bbe7-49d4-a23f-84559bce2819 ** SESSION LOADED ** Traceback (most recent call last): File "C:\Program Files\Python310\TeslaServiceManualScraper-master\scrape.py", line 272, in run() File "C:\Program Files\Python310\TeslaServiceManualScraper-master\scrape.py", line 261, in run driver.get_index() File "C:\Program Files\Python310\TeslaServiceManualScraper-master\scrape.py", line 46, in get_index driver = tesla_login(self.driver) File "C:\Program Files\Python310\TeslaServiceManualScraper-master\secrets.py", line 10, in tesla_login driver.find_element_by_css_selector("#form-input-identity").send_keys(tesla_account_email) File "C:\Program Files\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 814, in find_element_by_css_selector return self.find_element(by=By.CSS_SELECTOR, value=css_selector) File "C:\Program Files\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 1251, in find_element return self.execute(Command.FIND_ELEMENT, { File "C:\Program Files\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 430, in execute self.error_handler.check_response(response) File "C:\Program Files\Python310\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 247, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"css selector","selector":"#form-input-identity"} (Session info: chrome=103.0.5060.114) Stacktrace: Backtrace: Ordinal0 [0x00DF6463+2188387] Ordinal0 [0x00D8E461+1762401] Ordinal0 [0x00CA3D78+802168] Ordinal0 [0x00CD1880+989312] Ordinal0 [0x00CD1B1B+989979] Ordinal0 [0x00CFE912+1173778] Ordinal0 [0x00CEC824+1099812] Ordinal0 [0x00CFCC22+1166370] Ordinal0 [0x00CEC5F6+1099254] Ordinal0 [0x00CC6BE0+945120] Ordinal0 [0x00CC7AD6+948950] GetHandleVerifier [0x010971F2+2712546] GetHandleVerifier [0x0108886D+2652765] GetHandleVerifier [0x00E8002A+520730] GetHandleVerifier [0x00E7EE06+516086] Ordinal0 [0x00D9468B+1787531] Ordinal0 [0x00D98E88+1805960] Ordinal0 [0x00D98F75+1806197] Ordinal0 [0x00DA1DF1+1842673] BaseThreadInitThunk [0x76D36739+25] RtlGetFullPathName_UEx [0x77E88FEF+1215] RtlGetFullPathName_UEx [0x77E88FBD+1165]

AnsonLai commented 2 years ago

This appears to be the same issue as #9 which has been resolved in the latest merge. Thanks!