TRoboto / datacamp-downloader

Download your completed courses on Datacamp easily!
MIT License
178 stars 52 forks source link

ModuleNotFoundError: No module named 'undetected_chromedriver.v2' #64

Closed xanxdix closed 1 year ago

xanxdix commented 1 year ago

Dear developers,

thank you for developing this great piece of software. However, when executing it, I get this error:


datacamp login -u [myuser] -p [mypassword]

Traceback (most recent call last):
  File "C:\Users\weige\anaconda3\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\weige\anaconda3\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\weige\anaconda3\Scripts\datacamp.exe\__main__.py", line 4, in <module>
  File "C:\Users\weige\anaconda3\lib\site-packages\datacamp_downloader\__init__.py", line 3, in <module>
    from .session import Session
  File "C:\Users\weige\anaconda3\lib\site-packages\datacamp_downloader\session.py", line 6, in <module>
    import undetected_chromedriver.v2 as uc
ModuleNotFoundError: No module named 'undetected_chromedriver.v2'

Thank you for your time! Best xanxdix

ajg3 commented 1 year ago

pip uninstall undetected_chromedriver pip install undetected_chromedriver==2.1.2

Try that I think you have the "wrong" version

xanxdix commented 1 year ago

Thank you for your reply. Unfortunately, it still does not work. If I enter

datacamp set-token [my token] I get the following error message:

ERROR: expected str, bytes or os.PathLike object, not NoneType Exception ignored in: <function Chrome.__del__ at 0x0000017556F08160> Traceback (most recent call last): File "C:\Users\xxx\anaconda3\lib\site-packages\undetected_chromedriver\v2.py", line 623, in __del__ self.quit() File "C:\Users\xxx\anaconda3\lib\site-packages\undetected_chromedriver\v2.py", line 581, in quit self.service.process.kill() AttributeError: 'Chrome' object has no attribute 'service'

Moreover, during the installation of undetected_chromedriver==2.1.2 I get the following error:

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
datacamp-downloader 3.2 requires undetected-chromedriver>=3.0.3, but you have undetected-chromedriver 2.1.2 which is incompatible.

If I use undetected-chromedriver>=3.0.3 and execute the datacamp downloader again I still get the same error message as above.

ajg3 commented 1 year ago

Ah sorry then I'm not sure how to help. I just used it to download everything yesterday and I ran into your original error message, but uninstalling it then installing the specific version worked. I then had the issue my chrome was out of date so I just updated it and then everything worked.

xanxdix commented 1 year ago

This was the hint. I had no Chrome installed. I thought installing the packages are enough. After installing Chrome, everything worked. Thank you a lot.