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

HELP WANTED: resurrect the Hamster plugin #114

Closed
shtrom opened this issue May 31, 2015 · 14 comments · Fixed by #465
Closed

HELP WANTED: resurrect the Hamster plugin #114

shtrom opened this issue May 31, 2015 · 14 comments · Fixed by #465
Assignees
Labels
enhancement patch-or-wont-happen Core maintainers would like this, but lack time/energy. Contribute a patch or it won't happen. plugins Plugins and extra backends reproducible-in-git Issues that affect the current dev version

Comments

@shtrom
Copy link
Contributor

shtrom commented May 31, 2015

I'm getting the following error when starting GTG from 28fd75c (ArchLinux. built from https://aur.archlinux.org/packages/gtg-git/)

Traceback (most recent call last):
  File "/usr/bin/gtg", line 227, in <module>
    main()
  File "/usr/bin/gtg", line 173, in main
    manager = Manager(req)
  File "/usr/lib/python3.4/site-packages/GTG/gtk/manager.py", line 72, in __init__
    self.__init_plugin_engine()
  File "/usr/lib/python3.4/site-packages/GTG/gtk/manager.py", line 106, in __init_plugin_engine
    self.pengine.activate_plugins()
  File "/usr/lib/python3.4/site-packages/GTG/core/plugins/engine.py", line 220, in activate_plugins
    plugin.instance.activate(api)
  File "/usr/lib/python3.4/site-packages/GTG/plugins/hamster/hamster.py", line 235, in activate
    plugin_api.add_menu_item(self.menu_item)
  File "/usr/lib/python3.4/site-packages/GTG/core/plugins/api.py", line 141, in add_menu_item
    widget.get_submenu().append(item)
AttributeError: 'NoneType' object has no attribute 'get_submenu'
@izidormatusov izidormatusov added this to the 0.4 milestone Jun 1, 2015
@izidormatusov
Copy link
Contributor

Thanks for reporting bug. @jakubbrindza is working on his GSoC project and submitting his work to master every so often. You might expect broken master more often, but you will see all cool features first. We would like to hear your feedback (including issues like this)

He will fix this issue ASAP.

@olantwin
Copy link

olantwin commented Jun 1, 2015

@shtrom: Try down-grading, disabling hamster and upgrading again. The issue is with the plugins which are broken by the header-bar change.

Broken plugins include: hamster (see above), Not Today (same issue), Untouched (same issue). I expect more plugins are broken. So this is a symptom of the plugin API braking in general.

I was about to open an issue myself yesterday, but was unsure whether this is the right place to discuss issues with plugins.

(For completeness, also using the AUR package here, worked fine prior to the headerbar commit, after disabling offending plugins everything works.)

@shtrom
Copy link
Contributor Author

shtrom commented Jun 1, 2015

Hey Oliver,

On Mon, Jun 01, 2015 at 03:47:35AM -0700, Oliver Lantwin wrote:

@shtrom: Try down-grading, disabling hamster and upgrading again. The
issue is with the plugins which are broken by the header-bar change.

Yup, that worked. But I cannot re-activate Hamster afterwards, as it
raises the same issue. I'll downgrade for now, but I guess there should
generally be a non-fatal way of handling failing plugins (and display a
helpful message identifying the plugin and the error).

Otherwise, the new UI is pretty cool (:

Olivier Mehani shtrom@ssji.net
PGP fingerprint: 4435 CF6A 7C8D DD9B E2DE F5F9 F012 A6E2 98C6 6655
Confidentiality cannot be guaranteed on emails sent or received unencrypted.

@wywialm
Copy link

wywialm commented Nov 20, 2015

Installing from the same Arch Linux PKGBUILD, I get similar error:

sys:1: PyGIWarning: Gdk was imported without specifying a version first. Use gi.require_version('Gdk', '3.0') before import to ensure that the right version gets loaded.
sys:1: PyGIWarning: GnomeKeyring was imported without specifying a version first. Use gi.require_version('GnomeKeyring', '1.0') before import to ensure that the right version gets loaded.
sys:1: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
sys:1: PyGIWarning: NetworkManager was imported without specifying a version first. Use gi.require_version('NetworkManager', '1.0') before import to ensure that the right version gets loaded.
sys:1: PyGIWarning: NMClient was imported without specifying a version first. Use gi.require_version('NMClient', '1.0') before import to ensure that the right version gets loaded.
2015-11-20 13:29:23,212 - WARNING - __init__:__init__:70 - Backend backend_evolution could not be loaded: No module named 'dateutil'
2015-11-20 13:29:23,215 - WARNING - __init__:__init__:70 - Backend backend_launchpad could not be loaded: No module named 'launchpadlib'
2015-11-20 13:29:23,216 - WARNING - __init__:__init__:70 - Backend backend_mantis could not be loaded: No module named 'suds'
2015-11-20 13:29:23,217 - WARNING - __init__:__init__:70 - Backend backend_rtm could not be loaded: No module named 'dateutil'
/usr/lib/python3.5/site-packages/GTG/core/plugins/engine.py:123: PyGIWarning: Notify was imported without specifying a version first. Use gi.require_version('Notify', '0.7') before import to ensure that the right version gets loaded.
  module = imp.load_module(self.module_name, f, pathname, desc)
/usr/lib/python3.5/site-packages/GTG/core/plugins/engine.py:71: PyGIWarning: GtkClutter was imported without specifying a version first. Use gi.require_version('GtkClutter', '1.0') before import to ensure that the right version gets loaded.
  self._load_module(module_paths)
Traceback (most recent call last):
  File "/usr/bin/gtg", line 227, in <module>
    main()
  File "/usr/bin/gtg", line 173, in main
    manager = Manager(req)
  File "/usr/lib/python3.5/site-packages/GTG/gtk/manager.py", line 72, in __init__
    self.__init_plugin_engine()
  File "/usr/lib/python3.5/site-packages/GTG/gtk/manager.py", line 106, in __init_plugin_engine
    self.pengine.activate_plugins()
  File "/usr/lib/python3.5/site-packages/GTG/core/plugins/engine.py", line 220, in activate_plugins
    plugin.instance.activate(api)
  File "/usr/lib/python3.5/site-packages/GTG/plugins/not_today/not_today.py", line 32, in activate
    self._init_gtk()
  File "/usr/lib/python3.5/site-packages/GTG/plugins/not_today/not_today.py", line 62, in _init_gtk
    self.plugin_api.add_toolbar_item(self.tb_button)
  File "/usr/lib/python3.5/site-packages/GTG/core/plugins/api.py", line 169, in add_toolbar_item
    self.__toolbar.insert(widget, -1)
AttributeError: 'NoneType' object has no attribute 'insert'

Should I create a new issue?
Is it possible to fix this somehow?

@CosminG
Copy link

CosminG commented Nov 22, 2015

I had problem starting gtg and fix it by editing ~/.config/gtg/gtg.conf and disabling all the plug-ins:

[plugins]
disabled = bugzilla,hamster,untouched_tasks,tomboy,notification_area,geolocalized_tasks,export,urgency_color,not_today,send_email,task_reaper
enabled =

@rbasn-us
Copy link

I had the same issue as wywialm, and CosminG's suggestion about disabling the plugins worked as a work-around. From what I can tell about the issue:
"AttributeError: 'NoneType' object has no attribute 'insert' " is caused because earlier in api.py, the following is called:
"self.__toolbar = self.__builder.get_object('task_tb1')"
task_tb1 was a property set in taskeditor.ui, but since it was removed in a previous code change (commit 0c3d3ec), it no longer gets set, so it's value is considered None.

I'm not sure what should be done to correct this since I don't know what they were going for with all of the changes that were made.

@bugz8unny69
Copy link

Is this still the right place to get the Hamster plugin hopefully fixed?

@nekohayo
Copy link
Member

nekohayo commented Dec 11, 2019

Hi @LHorace, yes, kind of. There's also issues #80 and #198 ...

...but considering that Hamster has been dead and abandoned for years, and I haven't used it since 2012, there needs to be someone to step forward to provide patches for this. Patches welcome.

Whip this thing back into a demonstrably working state and we can keep it in the next release. Otherwise, I suspect it will have to be dropped as part of #222.

@nekohayo nekohayo added patch-or-wont-happen Core maintainers would like this, but lack time/energy. Contribute a patch or it won't happen. reproducible-in-git Issues that affect the current dev version labels Dec 11, 2019
@nekohayo nekohayo changed the title AttributeError: 'NoneType' object has no attribute 'get_submenu' with 28fd75c HELP WANTED: resurrect or kill the Hamster plugin - AttributeError: 'NoneType' object has no attribute 'get_submenu' with 28fd75c Dec 11, 2019
@nekohayo nekohayo removed this from the 0.4 "Work of love" milestone Apr 3, 2020
@nekohayo nekohayo changed the title HELP WANTED: resurrect or kill the Hamster plugin - AttributeError: 'NoneType' object has no attribute 'get_submenu' with 28fd75c HELP WANTED: resurrect the Hamster plugin Apr 3, 2020
@nekohayo
Copy link
Member

nekohayo commented Apr 3, 2020

Apparently the Hamster project is being revived as we speak. I had no idea!

Back in 2013 when I met the maintainer (Tom) and discussed with him he had given up on Hamster, but in 2016 some people decided to take over the maintenance as this blog post said:

[...] project hamster has now new maintainers and I fully stepped away from development a good while ago. I wish all the best to the new maintainers, you can follow their progress here: https://github.com/projecthamster/

...which had a joint announcement here on a new blog about the project reboot, but that "new" blog has then gone stale since 2017 and not much seemed to happen in terms of code from 2016 to 2018.

However when you look at https://github.com/projecthamster/hamster specifically (and not the other modules) you see that it's undergoing some sort of renaissance, actively being maintained and developed in 2019 and 2020 thanks to @ederag and @GeraldJansen, so that's encouraging. Hopefully there'll be a release this year :)

So... since there is development effort going on over there, I'll consider the integration with GTG still on the table/wishlist if someone wants to maintain it in GTG. But we do need someone to step up to test, fix and maintain the plugin on the GTG side and ensure it works harmoniously with "the new Hamster" (presuming it wouldn't work with the old hamster, since GTG git is now Python3 too), hence the "patch-or-wont-happen" tag on this ticket. I'm also marking this as an enhancement request with no targetted milestone now, because we are forced to deactivate the broken plugin until then, in order to be able to get GTG 0.4 out of the door.

TLDR: the Hamster integration feature is unlikely to be in 0.4 but may reappear in a future release if someone joins the project specifically to maintain it.

@GeraldJansen
Copy link
Contributor

The good news is that Hamster v3.0 has been released. The bad news is that a) support for external task lists has been removed, b) @ederag has quit as project maintainer and the future under the new maintainers remains uncertain. In my assessment the chances of seeing revival of GTG support in Hamster any time soon are very slim.

@GeraldJansen
Copy link
Contributor

On the other hand, this plugin uses Hamster's DBus interface to start/stop activities, and that should still work...

@nekohayo
Copy link
Member

nekohayo commented Apr 3, 2020

Thanks for the info @GeraldJansen ; I take the opportunity to clarify that the reason I mentioned you two was simply to praise you for your efforts, not to say that you should be the ones to revive the Hamster dbus plugin in GTG (unless you feel particularly motivated); when I say that "someone" needs to step up to maintain this plugin, I'm generally thinking of GTG users that care enough about this specific feature to become contributors of this specialized area.

@ederag
Copy link

ederag commented Apr 3, 2020

hamster is easier to maintain now, although the cleanup is unfinished;
it should be fine.
When someone else wants to re-establish the link with GTG, don't be afraid,
it should be fairly easy to integrate external.py in a standalone application, as suggested in #493.

@nekohayo nekohayo added the plugins Plugins and extra backends label May 12, 2020
flavin added a commit to flavin/gtg that referenced this issue Sep 23, 2020
update to new plugin api and update the description we send to dbus-hamster version 3.0.
flavin added a commit to flavin/gtg that referenced this issue Sep 23, 2020
flavin added a commit to flavin/gtg that referenced this issue Sep 23, 2020
flavin added a commit to flavin/gtg that referenced this issue Sep 23, 2020
flavin added a commit to flavin/gtg that referenced this issue Sep 23, 2020
@flavin
Copy link
Contributor

flavin commented Sep 23, 2020

Hi @nekohayo @diegogangl I did some update to the plugin, need some ui improvement to make it look more similar to GTG and follow gnome user interface guideline, but is working

#465

diegogangl pushed a commit that referenced this issue Oct 8, 2020
update to new plugin api and update the description we send to dbus-hamster version 3.0.
diegogangl pushed a commit that referenced this issue Oct 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement patch-or-wont-happen Core maintainers would like this, but lack time/energy. Contribute a patch or it won't happen. plugins Plugins and extra backends reproducible-in-git Issues that affect the current dev version
Projects
None yet
Development

Successfully merging a pull request may close this issue.