ngeteng / Shopee-flash-sale-shopee-github

31 stars 25 forks source link

ImportError: cannot import name 'Mapping' from 'collections' #5

Closed astronyu closed 2 years ago

astronyu commented 3 years ago

Hi, I'm trying this script but it gave me these every times. Could you help?


E:\Downloads\Compressed\Shopee-flash-sale-shopee-github-main>py shopee.py
Traceback (most recent call last):
  File "E:\Downloads\Compressed\Shopee-flash-sale-shopee-github-main\shopee.py", line 4, in <module>
    import undetected_chromedriver as UC
  File "C:\Users\X\AppData\Local\Programs\Python\Python310\lib\site-packages\undetected_chromedriver\__init__.py", line 31, in <module>
    from . import v2
  File "C:\Users\X\AppData\Local\Programs\Python\Python310\lib\site-packages\undetected_chromedriver\v2.py", line 21, in <module>
    from .cdp import CDP
  File "C:\Users\X\AppData\Local\Programs\Python\Python310\lib\site-packages\undetected_chromedriver\cdp.py", line 6, in <module>
    from collections import Mapping, Sequence
ImportError: cannot import name 'Mapping' from 'collections' (C:\Users\X\AppData\Local\Programs\Python\Python310\lib\collections\__init__.py)```
astronyu commented 3 years ago

Found the issue. First, DO NOT use python 3.10. Second, it need to have driver = UC.Chrome() or else it will give an error. Also, this script won't work if there are any Chromium fork installed such as Brave browser.

Any chance updating this to solve the issue with detecting other chromium version?

arrappp commented 2 years ago

Found the issue. First, DO NOT use python 3.10. Second, it need to have driver = UC.Chrome() or else it will give an error. Also, this script won't work if there are any Chromium fork installed such as Brave browser.

Any chance updating this to solve the issue with detecting other chromium version?

where to put driver = UC.Chrome() ?

bangkitboss commented 2 years ago

hello @astronyu

you can read HERE for more information.