UrekD / Telegram-To-Discord

Mirror all messages from Telegram channels to Discord via a webhook also translate any message that is not in English.
51 stars 12 forks source link

Unhandled exception on handler #1

Closed Sacti00n closed 1 year ago

Sacti00n commented 1 year ago

Getting this Error:

Unhandled exception on handler Traceback (most recent call last): File "C:\ProgramData\Anaconda3\lib\site-packages\telethon\client\updates.py", line 467, in _dispatch_update await callback(event) File "C:\Telegram-To-Discord-main\main.py", line 65, in handler dur = event.message.file.duration # Get duration AttributeError: 'NoneType' object has no attribute 'duration'

UrekD commented 1 year ago

Hey, what version of python and telethon version are you running?

Sacti00n commented 1 year ago

I‘m using 3.11.1

UrekD commented 1 year ago

and telethon...?

UrekD commented 1 year ago

Check latest, I updated some distributions but it works fine with PIP packages. Looking at the log you submitted I can only guess that the Anaconda Telethon package is the issue.

Sacti00n commented 1 year ago

Works like a charm now, thank you :D

UrekD commented 1 year ago

Glad to help, if you like the repo consider leaving a star :)