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

Telegram server says - Unauthorized #78

Open
monDieu999 opened this issue Feb 3, 2025 · 1 comment
Open

Telegram server says - Unauthorized #78

monDieu999 opened this issue Feb 3, 2025 · 1 comment

Comments

@monDieu999
Copy link

Hello. I have successfully installed ollama-telegram (version 1.1.3) on Windows 10. I am trying to run it using run.py method (without docker).
I have set the env variables with proper Telegram bot TOKEN, but it keeps giving the error:
Telegram server says - Unauthorized
I have tried deleting and recreating the bots, but same result.
I am quite sure the TOKEN are correct, have re-checked multiple times. Any idea why this happen?

Here's the log:
Z:\DOWNLOADS\ollama-telegram\bot>python run.py
DEBUG:asyncio:Using proactor: IocpProactor
users_ids: []
allowed_ids: []
Traceback (most recent call last):
File "Z:\DOWNLOADS\ollama-telegram\bot\run.py", line 508, in
asyncio.run(main())
~~~~~~~~~~~^^^^^^^^
File "Z:\GAMES\PYTHON\Lib\asyncio\runners.py", line 194, in run
return runner.run(main)
~~~~~~~~~~^^^^^^
File "Z:\GAMES\PYTHON\Lib\asyncio\runners.py", line 118, in run
return self._loop.run_until_complete(task)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "Z:\GAMES\PYTHON\Lib\asyncio\base_events.py", line 720, in run_until_complete
return future.result()
~~~~~~~~~~~~~^^
File "Z:\DOWNLOADS\ollama-telegram\bot\run.py", line 504, in main
await bot.set_my_commands(commands)
File "Z:\GAMES\PYTHON\Lib\site-packages\aiogram\client\bot.py", line 3657, in set_my_commands
return await self(call, request_timeout=request_timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "Z:\GAMES\PYTHON\Lib\site-packages\aiogram\client\bot.py", line 488, in call
return await self.session(self, method, timeout=request_timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "Z:\GAMES\PYTHON\Lib\site-packages\aiogram\client\session\base.py", line 254, in call
return cast(TelegramType, await middleware(bot, method))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "Z:\GAMES\PYTHON\Lib\site-packages\aiogram\client\session\aiohttp.py", line 189, in make_request
response = self.check_response(
bot=bot, method=method, status_code=resp.status, content=raw_result
)
File "Z:\GAMES\PYTHON\Lib\site-packages\aiogram\client\session\base.py", line 126, in check_response
raise TelegramUnauthorizedError(method=method, message=description)
aiogram.exceptions.TelegramUnauthorizedError: Telegram server says - Unauthorized
ERROR:asyncio:Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x000001F89C029BE0>
ERROR:asyncio:Unclosed connector
connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x000001F89C0169F0>, 1355.13138667)]']
connector: <aiohttp.connector.TCPConnector object at 0x000001F89C0297F0>

@monDieu999
Copy link
Author

monDieu999 commented Feb 4, 2025

After waiting a few hours, it seems the issue was fixed. Maybe the Telegram bot took quite some time to activate. You can just delete this issue.

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

1 participant