From goffi at goffi.org Tue Aug 2 23:20:32 2016 From: goffi at goffi.org (Goffi) Date: Tue, 02 Aug 2016 23:20:32 +0200 Subject: =?utf-8?b?W1PDoFQgZGV2XQ==?= =?utf-8?q?Implementation_XEP-0184?= In-Reply-To: <579A3F75.5000303@kingpenguin.tk> References: <5783E289.1050306@kingpenguin.tk> <579A3F75.5000303@kingpenguin.tk> Message-ID: <1513655.65Rc3I8hvj@tazar2> Le jeudi 28 juillet 2016, 19:23:01 CEST chteufleur a écrit : > Hi ! > > [en] > Here is an implementation for XEP-0184 (Message Delivery Receipts). > > [fr] > Voici une implémentation pour la XEP-0184 (Message Delivery Receipts). > > > ++ > Geoffrey applied thanks I have corrected a small typo in Privacy, and removed unused imports. I've also made a quick handling in primitivus, but it may need improvments in the future. As we said on sat@ room, if may be nice to send a messageState signal with an error status if the ack was not received after the timeout. Anyway, it's a great addition, thanks for your contribution :) Goffi From lists.xmpp.sat.users at xavier.maillard.im Tue Aug 9 23:17:21 2016 From: lists.xmpp.sat.users at xavier.maillard.im (Xavier Maillard) Date: Tue, 09 Aug 2016 23:17:21 +0200 Subject: =?utf-8?b?W1PDoFQgZGV2XQ==?= [DEV] Installation of 0.7D borked :( Message-ID: Hi, I have tried to install the latest devel "version" but since then, impossible to launch any frontend. I did (as Goffi told me): -> copy of my sat.db (just in case) -> hg pull -u into my sat directory -> pip install . (from my sat directory) -> sat then I saw this: bg:sat xavier$ sat Unhandled Error Traceback (most recent call last): File "/usr/local/lib/python2.7/site-packages/twisted/application/app.py", line 638, in run config.parseOptions() File "/usr/local/lib/python2.7/site-packages/twisted/application/app.py", line 605, in parseOptions usage.Options.parseOptions(self, options) File "/usr/local/lib/python2.7/site-packages/twisted/python/usage.py", line 262, in parseOptions for (cmd, short, parser, doc) in self.subCommands: File "/usr/local/lib/python2.7/site-packages/twisted/application/app.py", line 622, in subCommands for plug in sorted(plugins, key=attrgetter('tapname')): --- --- File "/usr/local/lib/python2.7/site-packages/twisted/plugin.py", line 217, in getPlugins adapted = interface(plugin, None) File "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/zope/interface/interface.py", line 467, in _call_conform return conform(self) File "/usr/local/lib/python2.7/site-packages/twisted/plugin.py", line 71, in __conform__ return self.load() File "/usr/local/lib/python2.7/site-packages/twisted/plugin.py", line 66, in load return namedAny(self.dropin.moduleName + '.' + self.name) File "/usr/local/lib/python2.7/site-packages/twisted/python/reflect.py", line 300, in namedAny topLevelPackage = _importAndCheckStack(trialname) File "/usr/local/lib/python2.7/site-packages/twisted/python/reflect.py", line 247, in _importAndCheckStack reraise(excValue, excTraceback) File "/usr/local/lib/python2.7/site-packages/twisted/plugins/libervia_server.py", line 34, in import libervia exceptions.ImportError: No module named libervia => but sat was well launched though What is broken is this: bg:sat xavier$ jp Traceback (most recent call last): File "/usr/local/bin/jp", line 20, in from sat_frontends.jp import base File "/usr/local/lib/python2.7/site-packages/sat_frontends/jp/base.py", line 32, in from gi.repository import GLib File "/usr/local/lib/python2.7/site-packages/gi/repository/__init__.py", line 25, in File "/usr/local/lib/python2.7/site-packages/gi/importer.py", line 31, in ImportError: No module named _gi (same occurs with primitivus). What am I supposed to do at this point ? :D Regards -- Xavier From goffi at goffi.org Wed Aug 10 14:38:35 2016 From: goffi at goffi.org (Goffi) Date: Wed, 10 Aug 2016 14:38:35 +0200 Subject: =?utf-8?b?W1PDoFQgZGV2XQ==?= =?utf-8?q?=5BDEV=5D_Installation_of_?= =?utf-8?q?0=2E7D_borked_=3A=28?= In-Reply-To: References: Message-ID: <3851505.1GPtPSuApp@tazar2> Le mardi 9 août 2016, 23:17:21 CEST Xavier Maillard a écrit : > then I saw this: > > bg:sat xavier$ sat >[...] > "/usr/local/lib/python2.7/site-packages/twisted/plugins/libervia_server.py" > , line 34, in import libervia > exceptions.ImportError: No module named libervia Looks like twistd is looking for libervia plugin but doesn't find it. does "twistd --help" work? Check if you have not a messy version of libervia, you can try to uninstall libervia (pip2 uninstall libervia if you have been using pip) and try to launch SàT backend only in a first time > What is broken is this: > > bg:sat xavier$ jp > [...] > ImportError: No module named _gi > > (same occurs with primitivus). you are lacking gobject which is needed for the loop. Unfortunately, is very hard to install it for pip (not sure if it's even possible), try to install gobject for Python2 from your distribution (apt-get install python-gobject-2) on Debian and derivated). > What am I supposed to do at this point ? :D Tell we if this help, and if note please give me more details on the distribution you are using and how you installed SàT (from Mercurial ? From pip ? from ftp ?). good luck Goffi From lists.xmpp.sat.dev at xavier.maillard.im Thu Aug 11 13:07:59 2016 From: lists.xmpp.sat.dev at xavier.maillard.im (Xavier Maillard) Date: Thu, 11 Aug 2016 13:07:59 +0200 Subject: =?utf-8?b?W1PDoFQgZGV2XQ==?= =?utf-8?q?=5BDEV=5D_Installation_of_?= =?utf-8?q?0=2E7D_borked_=3A=28?= In-Reply-To: <3851505.1GPtPSuApp@tazar2> (goffi@goffi.org's message of "Wed, 10 Aug 2016 14:38:35 +0200") References: <3851505.1GPtPSuApp@tazar2> Message-ID: Goffi writes: > Le mardi 9 août 2016, 23:17:21 CEST Xavier Maillard a écrit : > >> then I saw this: >> >> bg:sat xavier$ sat >>[...] >> "/usr/local/lib/python2.7/site-packages/twisted/plugins/libervia_server.py" >> , line 34, in import libervia >> exceptions.ImportError: No module named libervia > > Looks like twistd is looking for libervia plugin but doesn't find it. does > "twistd --help" work? Check if you have not a messy version of libervia, you > can try to uninstall libervia (pip2 uninstall libervia if you have been using > pip) and try to launch SàT backend only in a first time Thank you for the clue. In fact, I just forgot to upgrade my libervia installation with 0.7D tag... Did it and now, it's ok. >> What is broken is this: >> >> bg:sat xavier$ jp >> [...] >> ImportError: No module named _gi >> >> (same occurs with primitivus). > > you are lacking gobject which is needed for the loop. Unfortunately, is very > hard to install it for pip (not sure if it's even possible), try to install > gobject for Python2 from your distribution (apt-get install python-gobject-2) > on Debian and derivated). Ok, that did it. I presume homebrew went wrong at some point. I reinstalled pygobject and I am now able to use jp or primitivus. Thank you ! -- Xavier From goffi at goffi.org Sun Aug 21 15:31:31 2016 From: goffi at goffi.org (Goffi) Date: Sun, 21 Aug 2016 15:31:31 +0200 Subject: =?utf-8?b?W1PDoFQgZGV2XQ==?= [en] debugging tools Message-ID: <2629512.E7tCicLRIA@tazar2> Hi there, just a quick note to tell you that there a new debugging commands in jp, namely "jp debug". For now there is only a bridge subcommand, with 2 sub-subcommands: method and signal. As you can guess, the first one allow to call a bridge method pretty much as you could do with D-Bus, but directly from jp (which should make it easier). Commands are passed as Python expression (they are transformed to Python using "eval", so you can use real Python code), which of course you need to escape in shell syntax. Here are 2 examples: - getting the current version using getVersion bridge method: % jp debug bridge method getVersion 0.7.0D (rev 3a5badbb443d (default 2016-08-21 12:27 +0200)) - getting the available menus: % jp debug bridge method getMenus '""' -1 [D-Bus array] note here that I use "" for an empty Python string that I have to escape for shell (I use here single quotes), resulting in '""' (i.e. double-quoted empty python string escaped in single quoted shell string). The profile is passed using the common --profile optional argument, in the previous examples default profile has been used. The other method, "signal", allow to send a signal from backend, using the new debug plugin. This allow to simulate events without having to repeat same operations each time. For instance, I've used it to test Cagou notifications. It's used in the same way as method. I'm planing to implement a monitor command, with pretty printed XML for XMPP logs and/or bridge monitoring, and an other one to send raw XML with nice syntax. If you have other ideas, feel free to propose (or implement) them. As usual, feedback welcome. Goffi