Error when proxy option is used
sipy opened this issue · 3 comments
Hello,
when I try to use -p or -pf options with some IPs, I get the following error:
(env) C:\wamp64\www\ad_clicker-main>python ad_clicker.py -q "MY QUERY" -e "MY QUERY EXCEPTIONS" -pf proxies.txt
31-05-2023 10:08:59 [ INFO] 241: Using proxy: 82.147.128:80
31-05-2023 10:09:02 [ INFO] 81: Connecting with IP: 82.147.128
31-05-2023 10:09:11 [ INFO] 67: Starting search for 'MY QUERY'
Traceback (most recent call last):
File "C:\wamp64\www\ad_clicker-main\ad_clicker.py", line 98, in <module>
main()
File "C:\wamp64\www\ad_clicker-main\ad_clicker.py", line 86, in main
ads = search_controller.search_for_ads()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\wamp64\www\ad_clicker-main\search_controller.py", line 70, in search_for_ads
search_input_box = self._driver.find_element(*self.SEARCH_INPUT)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\wamp64\www\ad_clicker-main\env\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 831, in find_element
return self.execute(Command.FIND_ELEMENT, {"using": by, "value": value})["value"]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\wamp64\www\ad_clicker-main\env\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 440, in execute
self.error_handler.check_response(response)
File "C:\wamp64\www\ad_clicker-main\env\Lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 245, 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":"[name="q"]"}
(Session info: chrome=113.0.5672.127)
Stacktrace:
Backtrace:
GetHandleVerifier [0x007C8893+48451]
(No symbol) [0x0075B8A1]
(No symbol) [0x00665058]
(No symbol) [0x00690467]
(No symbol) [0x0069069B]
(No symbol) [0x006BDD92]
(No symbol) [0x006AA304]
(No symbol) [0x006BC482]
(No symbol) [0x006AA0B6]
(No symbol) [0x00687E08]
(No symbol) [0x00688F2D]
GetHandleVerifier [0x00A28E3A+2540266]
GetHandleVerifier [0x00A68959+2801161]
GetHandleVerifier [0x00A6295C+2776588]
GetHandleVerifier [0x00852280+612144]
(No symbol) [0x00764F6C]
(No symbol) [0x007611D8]
(No symbol) [0x007612BB]
(No symbol) [0x00754857]
BaseThreadInitThunk [0x770500C9+25]
RtlGetAppContainerNamedObjectPath [0x77B17B4E+286]
RtlGetAppContainerNamedObjectPath [0x77B17B1E+238]
Exception ignored in: <function Chrome.__del__ at 0x000002784CCDD940>
Traceback (most recent call last):
File "C:\wamp64\www\ad_clicker-main\env\Lib\site-packages\undetected_chromedriver\__init__.py", line 800, in __del__
File "C:\wamp64\www\ad_clicker-main\env\Lib\site-packages\undetected_chromedriver\__init__.py", line 755, in quit
OSError: [WinError 6] The handle is invalid
(env) C:\wamp64\www\ad_clicker-main>
Hi,
Your IP is wrong.
31-05-2023 10:08:59 [ INFO] 241: Using proxy: 82.147.128:80
31-05-2023 10:09:02 [ INFO] 81: Connecting with IP: 82.147.128
Forth field is missing (82.147.128.???).
Hi @coskundeniz ,
I get the same error with a valid IP, too:
`(env) C:\wamp64\www\ad_clicker-main>python ad_clicker.py -q "MY QUERY" -e "QUERY EXCEPTIONS" -p 85.196.183.162:5678
31-05-2023 14:23:37 [ INFO] 241: Using proxy: 85.196.183.162:5678
31-05-2023 14:23:40 [ INFO] 81: Connecting with IP: 85.196.183.162
31-05-2023 14:23:49 [ INFO] 67: Starting search for 'MY QUERY'
Traceback (most recent call last):
File "C:\wamp64\www\ad_clicker-main\ad_clicker.py", line 98, in
main()
File "C:\wamp64\www\ad_clicker-main\ad_clicker.py", line 86, in main
ads = search_controller.search_for_ads()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\wamp64\www\ad_clicker-main\search_controller.py", line 70, in search_for_ads
search_input_box = self._driver.find_element(*self.SEARCH_INPUT)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\wamp64\www\ad_clicker-main\env\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 831, in find_element
return self.execute(Command.FIND_ELEMENT, {"using": by, "value": value})["value"]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\wamp64\www\ad_clicker-main\env\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 440, in execute
self.error_handler.check_response(response)
File "C:\wamp64\www\ad_clicker-main\env\Lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 245, 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":"[name="q"]"}
(Session info: chrome=113.0.5672.127)
Stacktrace:
Backtrace:
GetHandleVerifier [0x004F8893+48451]
(No symbol) [0x0048B8A1]
(No symbol) [0x00395058]
(No symbol) [0x003C0467]
(No symbol) [0x003C069B]
(No symbol) [0x003EDD92]
(No symbol) [0x003DA304]
(No symbol) [0x003EC482]
(No symbol) [0x003DA0B6]
(No symbol) [0x003B7E08]
(No symbol) [0x003B8F2D]
GetHandleVerifier [0x00758E3A+2540266]
GetHandleVerifier [0x00798959+2801161]
GetHandleVerifier [0x0079295C+2776588]
GetHandleVerifier [0x00582280+612144]
(No symbol) [0x00494F6C]
(No symbol) [0x004911D8]
(No symbol) [0x004912BB]
(No symbol) [0x00484857]
BaseThreadInitThunk [0x770500C9+25]
RtlGetAppContainerNamedObjectPath [0x77B17B4E+286]
RtlGetAppContainerNamedObjectPath [0x77B17B1E+238]
Exception ignored in: <function Chrome.del at 0x000002108F979940>
Traceback (most recent call last):
File "C:\wamp64\www\ad_clicker-main\env\Lib\site-packages\undetected_chromedriver_init_.py", line 800, in del
File "C:\wamp64\www\ad_clicker-main\env\Lib\site-packages\undetected_chromedriver_init_.py", line 755, in quit
OSError: [WinError 6] The handle is invalid
(env) C:\wamp64\www\ad_clicker-main>
The reason is not clear from the error log. Please reserve a slot from the following link and we can check together.
https://calendly.com/coskundeniz/30min