S
S
surema2020-02-28 23:21:16
Python
surema, 2020-02-28 23:21:16

How to solve this problem with the mega.py module (tried others, they also work crookedly)?

Traceback (most recent call last):
  File "/Users/mac/PycharmProjects/mega/megabot.py", line 3, in <module>
    m = mega.login('тут email', 'тут пароль')
  File "/Users/mac/PycharmProjects/megabot/venv/lib/python3.8/site-packages/mega/mega.py", line 45, in login
    self._login_user(email, password)
  File "/Users/mac/PycharmProjects/megabot/venv/lib/python3.8/site-packages/mega/mega.py", line 77, in _login_user
    self._login_process(resp, password_aes)
  File "/Users/mac/PycharmProjects/megabot/venv/lib/python3.8/site-packages/mega/mega.py", line 131, in _login_process
    rsa_decrypter = RSA.construct(
  File "/Users/mac/PycharmProjects/megabot/venv/lib/python3.8/site-packages/Crypto/PublicKey/RSA.py", line 604, in construct
    raise ValueError("Invalid RSA condition")
ValueError: Invalid RSA condition

THE CODE:
from mega import Mega
mega = Mega()
m = mega.login('тут логин', 'тут пароль')

PS: If anonymous login (mega.login()), then everything ends with exit code 0
Documentation just in case https://pypi.org/project/mega.py/

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Karbivnichy, 2020-02-29
@hottabxp

Try it like this:

from mega import Mega

mega = Mega()
m = mega.login('почта', 'пароль')
details = m.get_user()

print(details)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question