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

Python 3.10 SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#' formats #92

Open
reisenmachtfreude opened this issue Oct 31, 2022 · 0 comments

Comments

@reisenmachtfreude
Copy link

Mega login runs into an error with Python 3.10.6 (Ubuntu 22.04)

File "/home/user/.local/lib/python3.10/site-packages/mega/mega.py", line 43, in login
  self._login_user(email, password)
File "/home/user/.local/lib/python3.10/site-packages/mega/mega.py", line 73, in _login_user
  self._login_process(resp, password_aes)
File "/home/user/.local/lib/python3.10/site-packages/mega/mega.py", line 102, in _login_process
  self.master_key = decrypt_key(encrypted_master_key, password)
File "/home/user/.local/lib/python3.10/site-packages/mega/crypto.py", line 74, in decrypt_key
  return sum(
File "/home/user/.local/lib/python3.10/site-packages/mega/crypto.py", line 75, in <genexpr>
  (aes_cbc_decrypt_a32(a[i:i + 4], key) for i in range(0, len(a), 4)), ()
File "/home/user/.local/lib/python3.10/site-packages/mega/crypto.py", line 42, in aes_cbc_decrypt_a32
  return str_to_a32(aes_cbc_decrypt(a32_to_str(data), a32_to_str(key)))
File "/home/user/.local/lib/python3.10/site-packages/mega/crypto.py", line 33, in aes_cbc_decrypt
  aes_cipher = AES.new(key, AES.MODE_CBC, makebyte('\0' * 16))
File "/home/user/.local/lib/python3.10/site-packages/Crypto/Cipher/AES.py", line 95, in new
  return AESCipher(key, *args, **kwargs)
File "/home/user/.local/lib/python3.10/site-packages/Crypto/Cipher/AES.py", line 59, in __init__
  blockalgo.BlockAlgo.__init__(self, _AES, key, *args, **kwargs)
File "/home/user/.local/lib/python3.10/site-packages/Crypto/Cipher/blockalgo.py", line 141, in __init__
  self._cipher = factory.new(key, *args, **kwargs)
SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#' formats
@reisenmachtfreude reisenmachtfreude changed the title Python 3.10 Python 3.10 SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#' formats Oct 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@reisenmachtfreude and others