Nekmo / telegram-upload

Upload and download files from Telegram up to 4 GiB using your account
MIT License
1.06k stars 233 forks source link

Import error when running telegram-upload #180

Open rayanfer32 opened 1 year ago

rayanfer32 commented 1 year ago

Import Error when running telegram-upload

What I Did

telegram-upload file1.mp4 /path/to/file.mp4

Logs:

Traceback (most recent call last):
  File "/usr/local/bin/telegram-upload", line 5, in <module>
    from telegram_upload.management import upload_cli
  File "/usr/local/lib/python3.8/dist-packages/telegram_upload/management.py", line 9, in <module>
    from telegram_upload.cli import show_checkboxlist, show_radiolist
  File "/usr/local/lib/python3.8/dist-packages/telegram_upload/cli.py", line 6, in <module>
    from prompt_toolkit.formatted_text import AnyFormattedText
ImportError: cannot import name 'AnyFormattedText' from 'prompt_toolkit.formatted_text' (/usr/local/lib/python3.8/dist-packages/prompt_toolkit/formatted_text/__init__.py)
Aldereteruiz97 commented 1 year ago

Here's how it worked for me: by changing the names of the modules that cannot be imported and in the file "/usr/local/lib/python3.8/dist-packages/telegram_upload/cli.py" and I ended up with this code. cli.py.TXT

Nekmo commented 1 year ago

The incident needs investigation.