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

Cannot import library #3116

Closed
gambitov opened this issue Jul 22, 2021 · 2 comments
Closed

Cannot import library #3116

gambitov opened this issue Jul 22, 2021 · 2 comments

Comments

@gambitov
Copy link

I have updated python (v3.7.5) and telethon (v1.23.0). The code loads and rune for a while, but It cannot impor telethon library later.

how can I fix it?

Traceback (most recent call last):
  File "analizador.py", line 9, in <module>
    from telethon.sync import TelegramClient, events
  File "/home/gabriel/.local/lib/python3.7/site-packages/telethon/__init__.py", line 1, in <module>
    from .client.telegramclient import TelegramClient
  File "/home/gabriel/.local/lib/python3.7/site-packages/telethon/client/__init__.py", line 12, in <module>
    from .telegrambaseclient import TelegramBaseClient
  File "/home/gabriel/.local/lib/python3.7/site-packages/telethon/client/telegrambaseclient.py", line 11, in <module>
    from ..crypto import rsa
  File "/home/gabriel/.local/lib/python3.7/site-packages/telethon/crypto/__init__.py", line 6, in <module>
    from .aes import AES
  File "/home/gabriel/.local/lib/python3.7/site-packages/telethon/crypto/aes.py", line 9, in <module>
    import pyaes
  File "/usr/local/lib/python3.7/dist-packages/pyaes/__init__.py", line 51, in <module>
    from .aes import AES, AESModeOfOperationCTR, AESModeOfOperationCBC, AESModeOfOperationCFB, AESModeOfOperationECB, AESModeOfOperationOFB, AESModesOfOperation, Counter
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 724, in exec_module
  File "<frozen importlib._bootstrap_external>", line 857, in get_code
  File "<frozen importlib._bootstrap_external>", line 525, in _compile_bytecode
ValueError: bad marshal data (unknown type code)
@Lonami
Copy link
Member

Lonami commented Jul 22, 2021

The package failing to import is pyaes. Try importing it directly. If it fails, open an issue in their repository.

@Lonami Lonami closed this as completed Jul 22, 2021
@gambitov
Copy link
Author

Dear @Lonami, I import pyaes directly, and the issue is not solved, I opened a issue in their repository. Thank you.

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