gajim-remote send_chat_message doesn't work
Versions
- OS: Ubuntu 20.04.5 LTS
- GTK Version: 3.24.20
- PyGObject Version: 3.36.0
- GLib Version : 2.64.2
- python-nbxmpp Version: 2.0.4
- Gajim Version: 1.3.3, I tried with Gajim 1.1.3 first, which is the default version on this distro, and I got the same result. Then I installed this newer Gajim and python-nbxmpp from .deb files manually and tried again.
Traceback
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/gajim/remote_control.py", line 100, in on_method_call
result = getattr(self, method_name)(*args)
File "/usr/lib/python3/dist-packages/gajim/remote_control.py", line 521, in send_chat_message
return self._send_message(jid, message, account)
File "/usr/lib/python3/dist-packages/gajim/remote_control.py", line 497, in _send_message
connected_account, contact = self._get_account_and_contact(account, jid)
File "/usr/lib/python3/dist-packages/gajim/remote_control.py", line 428, in _get_account_and_contact
contact = app.contacts.get_contact_with_highest_priority(
File "/usr/lib/python3/dist-packages/gajim/common/contacts.py", line 461, in get_contact_with_highest_priority
contacts = self.get_contacts(account, jid)
File "/usr/lib/python3/dist-packages/gajim/common/contacts.py", line 412, in get_contacts
return self._accounts[account].contacts.get_contacts(jid)
KeyError: ''
In the command line I see this:
gajim-remote send_chat_message "redacted@draugr.de" "something"
No translations found
Dirs searched: [PosixPath('/home/xy/.local/share'), PosixPath('/etc/xdg/lubuntu'), PosixPath('/usr/local/share'), PosixPath('/usr/share'), PosixPath('/usr/share/gdm'), PosixPath('/var/lib/menu-xdg'), PosixPath('/usr/local/share'), PosixPath('/usr/share'), PosixPath('/usr/share/gdm'), PosixPath('/var/lib/menu-xdg')]
Steps to reproduce the problem
My system locale is hu_HU. My command line locale is en_US.
Issue the command gajim-remote send_chat_message "redacted@draugr.de" "something"
Result:
The message is not sent and an error popup is displayed.
Second trial:
Versions
- OS: Ubuntu 20.04.5 LTS
- Gajim Version: 1.5.4 installed from Flatpak.
- A fully-featured XMPP chat client
- GTK Version: 3.24.36
- GLib Version: 2.74.4
- Pango Version: 1.50.12
- PyGObject Version: 3.42.2
- cairo Version: 1.16.0
- pycairo Version: 1.22.0
- python-nbxmpp Version: 3.2.5
Steps to reproduce the problem
Open a terminal and run this command: flatpak run --command="gajim-remote" org.gajim.Gajim send_chat_message redacted@jabber.hot-chilli.net "something" redacted@jabber.at
Expected behavior:
The message is sent.
Actual behavior:
The message is not sent.
The terminal output is:
False
Nothing else.
Both @xmpp addresses are correct. The first one is the addressee, the second one is the account's xmpp address.
Edit: I now changed the second address to just jabber.at and it started working "as expected". Also now the terminal prints
True
The help message only mentions "account", which is kind of ambiguous. It would be nice to make it more unambiguous.
~ flatpak run --command="gajim-remote" org.gajim.Gajim send_chat_message
usage: gajim-remote send_chat_message [-h] address message account
gajim-remote send_chat_message: error: the following arguments are required: address, message, account
~ flatpak run --command="gajim-remote" org.gajim.Gajim send_chat_message -h
usage: gajim-remote send_chat_message [-h] address message account
positional arguments:
address The XMPP address of the contact
message The message to be sent
account The account the command is executed for