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

tg doesn't send message; #305

Open
Rick21-bit opened this issue Sep 30, 2023 · 9 comments
Open

tg doesn't send message; #305

Rick21-bit opened this issue Sep 30, 2023 · 9 comments

Comments

@Rick21-bit
Copy link

I installed tg recently on arch.
It can do everything but write any type of message. 'i' or 'a' doesn't do anything

Here is the error.log
ERROR [2023-09-30 14:03:41,761] controllers.py:776 - handle | Error happend in key handle loop
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 770, in handle
res = fun(self, repeat_factor) # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 56, in _no_repeat_factor
return fun(self)
^^^^^^^^^
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 317, in write_short_msg
if not self.can_send_msg() or chat_id is None:
^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 489, in can_send_msg
return chat["permissions"]["can_send_messages"]
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
KeyError: 'can_send_messages'
ERROR [2023-09-30 14:03:42,406] controllers.py:776 - a
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 770, in handle
res = fun(self, repeat_factor) # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 56, in _no_repeat_factor
return fun(self)
^^^^^^^^^
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 317, in write_short_msg
if not self.can_send_msg() or chat_id is None:
^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 489, in can_send_msg
return chat["permissions"]["can_send_messages"]
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
KeyError: 'can_send_messages'
ERROR [2023-09-30 14:03:43,457] controllers.py:776 - handle | Error happend in key handle loop
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 770, in handle
res = fun(self, repeat_factor) # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 56, in _no_repeat_factor
return fun(self)
^^^^^^^^^
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 317, in write_short_msg
if not self.can_send_msg() or chat_id is None:
^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 489, in can_send_msg
return chat["permissions"]["can_send_messages"]
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
KeyError: 'can_send_messages'
ERROR [2023-09-30 14:03:43,742] controllers.py:776 - handle | Error happend in key handle loop
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 770, in handle
res = fun(self, repeat_factor) # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 56, in _no_repeat_factor
return fun(self)
^^^^^^^^^
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 317, in write_short_msg
if not self.can_send_msg() or chat_id is None:
^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 489, in can_send_msg
return chat["permissions"]["can_send_messages"]
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
KeyError: 'can_send_messages'
ERROR [2023-09-30 14:03:46,046] controllers.py:776 - handle | Error happend in key handle loop
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 770, in handle
res = fun(self, repeat_factor) # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 56, in _no_repeat_factor
return fun(self)
^^^^^^^^^
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 276, in reply_message
if not self.can_send_msg():
^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 489, in can_send_msg
return chat["permissions"]["can_send_messages"]
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
KeyError: 'can_send_messages'
ERROR [2023-09-30 14:19:58,082] update_handlers.py:32 - wrapper | Error happened in handler: updateNewMessage
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/tg/update_handlers.py", line 30, in wrapper
fun(controller, update)
File "/usr/lib/python3.11/site-packages/tg/update_handlers.py", line 79, in update_new_message
controller.notify_for_message(msg.chat_id, msg)
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 879, in notify_for_message
name = f"{user['first_name']} {user['last_name']}"
~~~~^^^^^^^^^^^^^^
KeyError: 'first_name'
ERROR [2023-09-30 14:20:06,553] controllers.py:776 - handle | Error happend in key handle loop
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 770, in handle
res = fun(self, repeat_factor) # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 56, in _no_repeat_factor
return fun(self)
^^^^^^^^^
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 317, in write_short_msg
if not self.can_send_msg() or chat_id is None:
^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 489, in can_send_msg
return chat["permissions"]["can_send_messages"]
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
KeyError: 'can_send_messages'
ERROR [2023-09-30 14:20:06,825] controllers.py:776 - handle | Error happend in key handle loop
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 770, in handle
res = fun(self, repeat_factor) # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 56, in _no_repeat_factor
return fun(self)
^^^^^^^^^
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 317, in write_short_msg
if not self.can_send_msg() or chat_id is None:
^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 489, in can_send_msg
return chat["permissions"]["can_send_messages"]
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
KeyError: 'can_send_messages'
ERROR [2023-09-30 14:20:06,991] controllers.py:776 - handle | Error happend in key handle loop
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 770, in handle
res = fun(self, repeat_factor) # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 56, in _no_repeat_factor
return fun(self)
^^^^^^^^^
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 317, in write_short_msg
if not self.can_send_msg() or chat_id is None:
^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 489, in can_send_msg
return chat["permissions"]["can_send_messages"]
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
KeyError: 'can_send_messages'
ERROR [2023-09-30 14:20:07,121] controllers.py:776 - handle | Error happend in key handle loop
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 770, in handle
res = fun(self, repeat_factor) # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 56, in _no_repeat_factor
return fun(self)
^^^^^^^^^
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 317, in write_short_msg
if not self.can_send_msg() or chat_id is None:
^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 489, in can_send_msg
return chat["permissions"]["can_send_messages"]
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
KeyError: 'can_send_messages'
ERROR [2023-09-30 14:20:07,293] controllers.py:776 - handle | Error happend in key handle loop
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 770, in handle
res = fun(self, repeat_factor) # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 56, in _no_repeat_factor
return fun(self)
^^^^^^^^^
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 317, in write_short_msg
if not self.can_send_msg() or chat_id is None:
^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 489, in can_send_msg
return chat["permissions"]["can_send_messages"]
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
KeyError: 'can_send_messages'
ERROR [2023-09-30 14:20:07,450] controllers.py:776 - handle | Error happend in key handle loop
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 770, in handle
res = fun(self, repeat_factor) # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 56, in _no_repeat_factor
return fun(self)
^^^^^^^^^
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 317, in write_short_msg
if not self.can_send_msg() or chat_id is None:
^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 489, in can_send_msg
return chat["permissions"]["can_send_messages"]
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
KeyError: 'can_send_messages'
ERROR [2023-09-30 14:20:07,626] controllers.py:776 - handle | Error happend in key handle loop
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 770, in handle
res = fun(self, repeat_factor) # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 56, in _no_repeat_factor
return fun(self)
^^^^^^^^^
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 317, in write_short_msg
if not self.can_send_msg() or chat_id is None:
^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 489, in can_send_msg
return chat["permissions"]["can_send_messages"]
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
KeyError: 'can_send_messages'
ERROR [2023-09-30 14:20:07,779] controllers.py:776 - handle | Error happend in key handle loop
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 770, in handle
res = fun(self, repeat_factor) # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 56, in _no_repeat_factor
return fun(self)
^^^^^^^^^
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 317, in write_short_msg
if not self.can_send_msg() or chat_id is None:
^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 489, in can_send_msg
return chat["permissions"]["can_send_messages"]
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
KeyError: 'can_send_messages'
ERROR [2023-09-30 14:20:22,769] update_handlers.py:32 - wrapper | Error happened in handler: updateChatDraftMessage
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/tg/update_handlers.py", line 30, in wrapper
fun(controller, update)
File "/usr/lib/python3.11/site-packages/tg/update_handlers.py", line 190, in update_chat_draft_message
order = update["order"]
~~~~~~^^^^^^^^^
KeyError: 'order'
ERROR [2023-09-30 14:22:38,025] update_handlers.py:32 - wrapper | Error happened in handler: updateChatDraftMessage
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/tg/update_handlers.py", line 30, in wrapper
fun(controller, update)
File "/usr/lib/python3.11/site-packages/tg/update_handlers.py", line 190, in update_chat_draft_message
order = update["order"]
~~~~~~^^^^^^^^^
KeyError: 'order'
ERROR [2023-09-30 14:23:10,177] update_handlers.py:32 - wrapper | Error happened in handler: updateChatDraftMessage
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/tg/update_handlers.py", line 30, in wrapper
fun(controller, update)
File "/usr/lib/python3.11/site-packages/tg/update_handlers.py", line 190, in update_chat_draft_message
order = update["order"]
~~~~~~^^^^^^^^^
KeyError: 'order'
ERROR [2023-09-30 14:23:16,009] update_handlers.py:32 - wrapper | Error happened in handler: updateChatDraftMessage
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/tg/update_handlers.py", line 30, in wrapper
fun(controller, update)
File "/usr/lib/python3.11/site-packages/tg/update_handlers.py", line 190, in update_chat_draft_message
order = update["order"]
~~~~~~^^^^^^^^^
KeyError: 'order'
ERROR [2023-09-30 14:23:27,082] update_handlers.py:32 - wrapper | Error happened in handler: updateChatDraftMessage
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/tg/update_handlers.py", line 30, in wrapper
fun(controller, update)
File "/usr/lib/python3.11/site-packages/tg/update_handlers.py", line 190, in update_chat_draft_message
order = update["order"]
~~~~~~^^^^^^^^^
KeyError: 'order'
ERROR [2023-09-30 14:23:30,356] update_handlers.py:32 - wrapper | Error happened in handler: updateChatDraftMessage
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/tg/update_handlers.py", line 30, in wrapper
fun(controller, update)
File "/usr/lib/python3.11/site-packages/tg/update_handlers.py", line 190, in update_chat_draft_message
order = update["order"]
~~~~~~^^^^^^^^^
KeyError: 'order'
ERROR [2023-09-30 14:23:38,036] update_handlers.py:32 - wrapper | Error happened in handler: updateChatDraftMessage
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/tg/update_handlers.py", line 30, in wrapper
fun(controller, update)
File "/usr/lib/python3.11/site-packages/tg/update_handlers.py", line 190, in update_chat_draft_message
order = update["order"]
~~~~~~^^^^^^^^^
KeyError: 'order'
ERROR [2023-09-30 14:32:49,973] controllers.py:776 - handle | Error happend in key handle loop
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 770, in handle
res = fun(self, repeat_factor) # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 56, in _no_repeat_factor
return fun(self)
^^^^^^^^^
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 317, in write_short_msg
if not self.can_send_msg() or chat_id is None:
^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 489, in can_send_msg
return chat["permissions"]["can_send_messages"]
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
KeyError: 'can_send_messages'
ERROR [2023-09-30 14:32:50,655] controllers.py:776 - handle | Error happend in key handle loop
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 770, in handle
res = fun(self, repeat_factor) # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 56, in _no_repeat_factor
return fun(self)
^^^^^^^^^
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 317, in write_short_msg
if not self.can_send_msg() or chat_id is None:
^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 489, in can_send_msg
return chat["permissions"]["can_send_messages"]
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
KeyError: 'can_send_messages'
ERROR [2023-09-30 14:32:51,001] controllers.py:776 - handle | Error happend in key handle loop
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 770, in handle
res = fun(self, repeat_factor) # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 56, in _no_repeat_factor
return fun(self)
^^^^^^^^^
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 317, in write_short_msg
if not self.can_send_msg() or chat_id is None:
^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 489, in can_send_msg
return chat["permissions"]["can_send_messages"]
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
KeyError: 'can_send_messages'
ERROR [2023-09-30 14:33:41,640] controllers.py:776 - handle | Error happend in key handle loop
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 770, in handle
res = fun(self, repeat_factor) # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 56, in _no_repeat_factor
return fun(self)
^^^^^^^^^
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 317, in write_short_msg
if not self.can_send_msg() or chat_id is None:
^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 489, in can_send_msg
return chat["permissions"]["can_send_messages"]
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
KeyError: 'can_send_messages'
ERROR [2023-09-30 14:33:41,958] controllers.py:776 - handle | Error happend in key handle loop
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 770, in handle
res = fun(self, repeat_factor) # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 56, in _no_repeat_factor
return fun(self)
^^^^^^^^^
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 317, in write_short_msg
if not self.can_send_msg() or chat_id is None:
^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 489, in can_send_msg
return chat["permissions"]["can_send_messages"]
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
KeyError: 'can_send_messages'
ERROR [2023-09-30 14:33:42,310] controllers.py:776 - handle | Error happend in key handle loop
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 770, in handle
res = fun(self, repeat_factor) # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 56, in _no_repeat_factor
return fun(self)
^^^^^^^^^
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 317, in write_short_msg
if not self.can_send_msg() or chat_id is None:
^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 489, in can_send_msg
return chat["permissions"]["can_send_messages"]
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
KeyError: 'can_send_messages'
ERROR [2023-09-30 14:34:30,645] controllers.py:776 - handle | Error happend in key handle loop
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 770, in handle
res = fun(self, repeat_factor) # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 56, in _no_repeat_factor
return fun(self)
^^^^^^^^^
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 317, in write_short_msg
if not self.can_send_msg() or chat_id is None:
^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 489, in can_send_msg
return chat["permissions"]["can_send_messages"]
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
KeyError: 'can_send_messages'
ERROR [2023-09-30 14:34:31,392] controllers.py:776 - handle | Error happend in key handle loop
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 770, in handle
res = fun(self, repeat_factor) # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 56, in _no_repeat_factor
return fun(self)
^^^^^^^^^
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 317, in write_short_msg
if not self.can_send_msg() or chat_id is None:
^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 489, in can_send_msg
return chat["permissions"]["can_send_messages"]
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
KeyError: 'can_send_messages'
ERROR [2023-09-30 14:34:34,278] controllers.py:776 - handle | Error happend in key handle loop
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 770, in handle
res = fun(self, repeat_factor) # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 56, in _no_repeat_factor
return fun(self)
^^^^^^^^^
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 317, in write_short_msg
if not self.can_send_msg() or chat_id is None:
^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/tg/controllers.py", line 489, in can_send_msg
return chat["permissions"]["can_send_messages"]
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
KeyError: 'can_send_messages'

How can i fix this?

@sabitov-kirill
Copy link

Same problem on Arch Linux

@doclai
Copy link

doclai commented Oct 7, 2023

Same problem here on Arch

@Omixxx
Copy link

Omixxx commented Oct 12, 2023

Same problem here. I personally don't get any errors, but the functionality still doesn't work.
I use arch (maybe we are the problem? 😄 )

@aincube
Copy link

aincube commented Oct 23, 2023

For me, permissions looks like this:

'permissions': {'@type': 'chatPermissions', 'can_send_basic_messages': True, 'can_send_audios': True, 'can_send_documents': True, 'can_send_photos': True, 'can_send_videos': True, 'can_send_video_notes': True, 'can_send_voice_notes': True, 'can_send_polls': True, 'can_send_other_messages': True, 'can_add_web_page_previews': True, 'can_change_info': False, 'can_invite_users': False, 'can_pin_messages': True, 'can_manage_topics': False},

There is no can_send_messages. So I've just changed the line 489 in controllers.py from ["can_send_messages"] to ["can_send_basic_messages"] and it works.

@Sabin-Rusu
Copy link

Same problem on Arch and modifying controllers.py doesn't fix it for me

@pasha-dushny
Copy link

Same problem after update of libtd

[2023-11-26T22:56:53+0300] [ALPM] upgraded libtd (1.8.5-1 -> 1.8.16-1)

So I've just changed the line 489 in controllers.py from ["can_send_messages"] to ["can_send_basic_messages"] and it works.

it helps

@mindtheegab
Copy link

changing can_send_messages to can_send_basic_messages fixed it for me

@grbll
Copy link

grbll commented Jan 29, 2024

Where do I change these setting? I use tg installed from AUR on Arch. After some update I am unable to even write message (i,I,a,A all do Nothing).

@aincube
Copy link

aincube commented Feb 4, 2024

Where do I change these setting? I use tg installed from AUR on Arch. After some update I am unable to even write message (i,I,a,A all do Nothing).
You can check where package was installed and then change it manually in any editor or by sed

#Check where file controllers.py was installed:
pacman -Ql telegram-tg | grep "controllers.py"
#Check if line 489 contains what we need to change
sed -n '489'p /path/to/controllers.py
#Modify line 489
sed -i '489s/.*/        return chat["permissions"]["can_send_basic_messages"]/' /path/to/controllers.py

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

9 participants