Discussion:
[gedit-list] TypeError when using External Tools plugin
p***@redpanda.nl
2014-11-04 15:31:02 UTC
Permalink
Another plugin is causing some issues. In the External Tools dialog, there
is an option "Save". When I select "Current document" and subsequently try
to run the custom command, I get the error

Traceback (most recent call last):
File "/usr/lib/gedit/plugins/externaltools/functions.py", line 298, in
capture_menu_action
MultipleDocumentsSaver(window, panel, False, node)
File "/usr/lib/gedit/plugins/externaltools/functions.py", line 263, in
__init__
signals[doc] = doc.connect('saving', self.on_document_saving)
TypeError: <Document object at 0x7f57885ae708 (GeditDocument at
0x1d3cca0)>: unknown signal name: saving

This might be related to the message that's printed when I open a file,

TypeError: on_saved_or_loaded() missing 1 required positional argument:
'data'

Using gedit 3.14.0 on 64bit Linux.
Sébastien Wilmet
2014-11-04 17:18:10 UTC
Permalink
Hi,
Post by p***@redpanda.nl
Another plugin is causing some issues. In the External Tools dialog, there
is an option "Save". When I select "Current document" and subsequently try
to run the custom command, I get the error
File "/usr/lib/gedit/plugins/externaltools/functions.py", line 298, in
capture_menu_action
MultipleDocumentsSaver(window, panel, False, node)
File "/usr/lib/gedit/plugins/externaltools/functions.py", line 263, in
__init__
signals[doc] = doc.connect('saving', self.on_document_saving)
TypeError: <Document object at 0x7f57885ae708 (GeditDocument at
0x1d3cca0)>: unknown signal name: saving
This might be related to the message that's printed when I open a file,
'data'
Using gedit 3.14.0 on 64bit Linux.
Thanks for the bug report.

The external tools plugin needs to be updated, there has been some
changes in GeditDocument between gedit 3.12 and 3.14, well documented
here:
https://wiki.gnome.org/Apps/Gedit/API-Changes

I thought all core plugins were correctly updated, but it seems that
external tools slipped through the cracks.

--
Sébastien
Sébastien Wilmet
2014-11-29 16:47:39 UTC
Permalink
Post by Sébastien Wilmet
The external tools plugin needs to be updated, there has been some
changes in GeditDocument between gedit 3.12 and 3.14, well documented
https://wiki.gnome.org/Apps/Gedit/API-Changes
I thought all core plugins were correctly updated, but it seems that
external tools slipped through the cracks.
This is now fixed. It'll be available for the next 3.14.x version of
gedit.

Cheers,
Sébastien
p***@redpanda.nl
2014-12-03 09:50:18 UTC
Permalink
Well, after replacing my /usr/lib/gedit/plugins/externaltools/functions.py
with the version on GitHub, I get the following error (using the option to
save the current document before running the external command):

Traceback (most recent call last):
File "/usr/lib/gedit/plugins/externaltools/functions.py", line 280, in
capture_menu_action
MultipleDocumentsSaver(window, panel, False, node)
File "/usr/lib/gedit/plugins/externaltools/functions.py", line 256, in
__init__
self.save_next_document()
File "/usr/lib/gedit/plugins/externaltools/functions.py", line 266, in
save_next_document
Gedit.commands_save_document_async(next_doc,
File "/usr/lib/python3.4/site-packages/gi/module.py", line 320, in
__getattr__
return getattr(self._introspection_module, name)
File "/usr/lib/python3.4/site-packages/gi/module.py", line 139, in
__getattr__
self.__name__, name))
AttributeError: 'gi.repository.Gedit' object has no attribute
'commands_save_document_async'

Any ideas?
Thanks, Pieter.
Post by Sébastien Wilmet
Post by Sébastien Wilmet
The external tools plugin needs to be updated, there has been some
changes in GeditDocument between gedit 3.12 and 3.14, well documented
https://wiki.gnome.org/Apps/Gedit/API-Changes
I thought all core plugins were correctly updated, but it seems that
external tools slipped through the cracks.
This is now fixed. It'll be available for the next 3.14.x version of
gedit.
Cheers,
Sébastien
_______________________________________________
gedit-list mailing list
https://mail.gnome.org/mailman/listinfo/gedit-list
Sébastien Wilmet
2014-12-03 10:01:32 UTC
Permalink
Post by p***@redpanda.nl
AttributeError: 'gi.repository.Gedit' object has no attribute
'commands_save_document_async'
Any ideas?
You need the latest version of gedit, from Git. Especially this commit:
https://git.gnome.org/browse/gedit/commit/?id=9ea2b0981672204a32d82f10b7fbf702f26d1b22

And the previous ones.

There will be a new gedit 3.14.x release that will include those
changes.

--
Sébastien
p***@redpanda.nl
2014-12-03 10:24:30 UTC
Permalink
Ok, I should have checked for commits outside of the plugins directory :).
Looking forward to the new release! Cheers, Pieter.
Post by Sébastien Wilmet
Post by p***@redpanda.nl
AttributeError: 'gi.repository.Gedit' object has no attribute
'commands_save_document_async'
Any ideas?
https://git.gnome.org/browse/gedit/commit/?id=9ea2b0981672204a32d82f10b7fbf702f26d1b22
And the previous ones.
There will be a new gedit 3.14.x release that will include those
changes.
--
Sébastien
_______________________________________________
gedit-list mailing list
https://mail.gnome.org/mailman/listinfo/gedit-list
Loading...