Closed jedistunnah closed 1 year ago
Okay I have fixed that error. With python 3.10 you need to update the cdp file with the chrome driver to from collections.abc import Mapping, Sequence Now I am having a total different issue.
Any idea on this fix?
I would also like to know what version of python you are using. Thanks
The response to this issue may help. Let me know if that doesn't solve your error.
I did a clean install of python and tired both ways with the both If you use the undetected-chromedriver library, use import undetected_chromedriver as uc in the code If you use the undetected-chromedriver-modified library, use import undetected_chromedriver.v2 as uc in the code
Same results both ways. I did clean install with both... Also tried both with using python 3.10 same results.
To confirm, do you have both undetected-chromedriver
and undetected-chromedriver-modified
libraries installed? I believe you can only have one installed. Having both can cause errors.
I do not have both installed.
In Chrome, go to chrome://settings/help
in your URL bar. There may be a relaunch option where your Chrome version is. Otherwise, try to upgrade your Chrome version. Your Chrome version may be different from the ChromeDriver version downloaded by the program.
I am having the same issues as well. Tried using multiple chrome versions as well as the most up to date version.
In this section of the code, try to remove the try
, except
and pass
. See what kind of error the program throws.
BOOM... I can't believe it the chrome version was out of date.. Good call i didn't even think about that. Thank you so much.
Hi Yuri, I did not quite understand how to resolve the match number:SyntaxError: invalid syntax. Jedi mentioned "Okay I have fixed that error. With python 3.10 you need to update the cdp file with the chrome driver to from collections.abc import Mapping, Sequence". I am not sure how to do it. Can you provide more details? Thanks
I think you have to go to C:\Users\your_username\AppData\Local\Programs\Python\Python310\Lib\site-packages\undetected_chromedriver\cdp.py
(you'll have to find where your site-packages are located) and update from collections import Mapping, Sequence
to from collections.abc import Mapping, Sequence
I think you have to go to
C:\Users\your_username\AppData\Local\Programs\Python\Python310\Lib\site-packages\undetected_chromedriver\cdp.py
(you'll have to find where your site-packages are located) and updatefrom collections import Mapping, Sequence
tofrom collections.abc import Mapping, Sequence
Thanks, Yuri. I had Python 3.9. I upgraded to the 3.11 and reinstalled all required packages. The issue was resolved. I can run the code now. I tried Fanduel and Draftkings file. Two chrome webpages and a small window with 'start' and 'stop' popped up. However, nothing happens after pressing the start button. Any idea?
The FanDuel XPath selectors needed updating. I've updated the code. Give it a try again with the latest code.
F & D - Arb_Website - Two Person.py", line 98 match number: ^ SyntaxError: invalid syntax
This is what I get when I run the program.. I have all the requirements.
Any help you could provide to troubleshoot would be appreciated.