Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: RuntimeError: Failed to decrypt the cipher text with DPAPI #250

Open
parvinders347 opened this issue Oct 25, 2024 · 1 comment
Open
Assignees
Labels
bug Something isn't working

Comments

@parvinders347
Copy link

What happened?

its showing this error:
`[08:29:49] [udemy-downloader] [pre_run:331] INFO: Output directory set to E:\TelegramCourseRequest
[08:29:49] [udemy-downloader] [init:359] WARNING: No bearer token was provided, attempting to use browser cookies.
Traceback (most recent call last):
File "C:\Users\singh\AppData\Local\Programs\Python\Python311\Lib\site-packages\browser_cookie3_init_.py", line 539, in _decrypt
return self.decrypt_windows_chromium(value, encrypted_value)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\singh\AppData\Local\Programs\Python\Python311\Lib\site-packages\browser_cookie3_init
.py", line 530, in _decrypt_windows_chromium
_, data = crypt_unprotect_data(encrypted_value)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\singh\AppData\Local\Programs\Python\Python311\Lib\site-packages\browser_cookie3_init
.py", line 89, in _crypt_unprotect_data
raise RuntimeError('Failed to decrypt the cipher text with DPAPI')
RuntimeError: Failed to decrypt the cipher text with DPAPI

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\Udemy-DL\main.py", line 2066, in
main()
File "C:\Users\Udemy-DL\main.py", line 1932, in main
udemy = Udemy(bearer_token)
^^^^^^^^^^^^^^^^^^^
File "C:\Users\Udemy-DL\main.py", line 372, in init
cj = browser_cookie3.brave()
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\singh\AppData\Local\Programs\Python\Python311\Lib\site-packages\browser_cookie3_init_.py", line 1188, in brave
return Brave(cookie_file, domain_name, key_file).load()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\singh\AppData\Local\Programs\Python\Python311\Lib\site-packages\browser_cookie3_init_.py", line 515, in load
value = self.decrypt(value, enc_value)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\singh\AppData\Local\Programs\Python\Python311\Lib\site-packages\browser_cookie3_init
.py", line 559, in _decrypt
return data.decode()
^^^^^^^^^^^^^
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x97 in position 2: invalid start byte`

My command: py main.py -c https://www.udemy.com/course/tableau-accelerate-your-career-and-get-certified/learn --download-assets --out E:\yobro --id-as-course-name --browser brave

Expected Result

Download the course without any error

Branch

master/main

What operating systems are you seeing the problem on?

Windows

Relevant log output

No response

Other information

No response

@parvinders347 parvinders347 added the bug Something isn't working label Oct 25, 2024
@Onyz107
Copy link

Onyz107 commented Oct 26, 2024

I think this is related to issue #251

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants