Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 509028 - net-misc/electrum-1.9.8: crash on startup with GTK UI
Summary: net-misc/electrum-1.9.8: crash on startup with GTK UI
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Anthony Basile
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 541538
  Show dependency tree
 
Reported: 2014-04-28 23:03 UTC by Alexander Matviychuk
Modified: 2015-03-05 22:29 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Matviychuk 2014-04-28 23:03:12 UTC
$ electrum -g gtk

Traceback (most recent call last):
  File "/usr/lib/python-exec/python2.7/electrum", line 204, in <module>
    gui.main(url)
  File "/usr/lib64/python2.7/site-packages/electrum_gui/gtk.py", line 1310, in main
    action = self.restore_or_create()
  File "/usr/lib64/python2.7/site-packages/electrum_gui/gtk.py", line 1351, in restore_or_create
    return restore_create_dialog()
  File "/usr/lib64/python2.7/site-packages/electrum_gui/gtk.py", line 90, in restore_create_dialog
    flags=Gtk.DialogFlags.MODAL|Gtk.DialogFlags.NO_SEPARATOR,
AttributeError: type object 'GtkDialogFlags' has no attribute 'NO_SEPARATOR'


Reproducible: Always

Steps to Reproduce:
1.electrum -g gtk
Actual Results:  
Traceback (most recent call last):
  File "/usr/lib/python-exec/python2.7/electrum", line 204, in <module>
    gui.main(url)
  File "/usr/lib64/python2.7/site-packages/electrum_gui/gtk.py", line 1310, in main
    action = self.restore_or_create()
  File "/usr/lib64/python2.7/site-packages/electrum_gui/gtk.py", line 1351, in restore_or_create
    return restore_create_dialog()
  File "/usr/lib64/python2.7/site-packages/electrum_gui/gtk.py", line 90, in restore_create_dialog
    flags=Gtk.DialogFlags.MODAL|Gtk.DialogFlags.NO_SEPARATOR,
AttributeError: type object 'GtkDialogFlags' has no attribute 'NO_SEPARATOR'


Expected Results:  
GTK UI appears
Comment 1 Rafał Mużyło 2014-04-29 00:24:33 UTC
> Gtk.DialogFlags.NO_SEPARATOR

That's kind of a porting bug.
This flag isn't valid for gtk3.

So, an upstream bug.
Comment 2 Alexander Matviychuk 2014-04-30 02:58:32 UTC
Filed issue upstream: https://github.com/spesmilo/electrum/issues/673

Will update once I hear back from them. Otherwise this package doesn't seem to currently work with GTK under the normal Gentoo emerge process.

Any hints on a workaround are appreciated.
Comment 3 Alexander Matviychuk 2014-04-30 08:00:21 UTC
Upstream said that they recently moved to gtk3 and closed the issue. I'm assuming this package needs to be updated to reflect that. Is this correct or is there some way for me to force gtk3 to be selected?

I poked around the Gentoo docs, but the only real insight I got was from the policies page which said that each package is responsible for selecting the right gtk slot. (please forgive the ignorance on my part, I'm still learning about portage)
Comment 4 Anthony Basile gentoo-dev 2014-04-30 11:41:18 UTC
(In reply to Alexander Matviychuk from comment #3)
> Upstream said that they recently moved to gtk3 and closed the issue. I'm
> assuming this package needs to be updated to reflect that. Is this correct
> or is there some way for me to force gtk3 to be selected?
> 
> I poked around the Gentoo docs, but the only real insight I got was from the
> policies page which said that each package is responsible for selecting the
> right gtk slot. (please forgive the ignorance on my part, I'm still learning
> about portage)

Can you try 1.9.7 which is previous to that commit and see if it works.  I'm using pygtk:2 which is the python bindings for gtk+:2 so you may have in fact uncovered the problem.
Comment 5 Anthony Basile gentoo-dev 2014-04-30 13:00:33 UTC
(In reply to Anthony Basile from comment #4)
> (In reply to Alexander Matviychuk from comment #3)
> > Upstream said that they recently moved to gtk3 and closed the issue. I'm
> > assuming this package needs to be updated to reflect that. Is this correct
> > or is there some way for me to force gtk3 to be selected?
> > 
> > I poked around the Gentoo docs, but the only real insight I got was from the
> > policies page which said that each package is responsible for selecting the
> > right gtk slot. (please forgive the ignorance on my part, I'm still learning
> > about portage)
> 
> Can you try 1.9.7 which is previous to that commit and see if it works.  I'm
> using pygtk:2 which is the python bindings for gtk+:2 so you may have in
> fact uncovered the problem.

You can also try installing pygobject since it provides gtk+:3 python bindings.
Comment 6 Rafał Mużyło 2014-04-30 17:26:40 UTC
(In reply to Alexander Matviychuk from comment #2)
> Filed issue upstream: https://github.com/spesmilo/electrum/issues/673
> 
> Will update once I hear back from them. Otherwise this package doesn't seem
> to currently work with GTK under the normal Gentoo emerge process.
> 
> Any hints on a workaround are appreciated.

The upstream is clueless here - this is a case of a bad port.

In gtk2 GtkDialog has “has-separator” property, in gtk3 that property has been removed.

The proper fix is to remove 'Gtk.DialogFlags.NO_SEPARATOR'.
Comment 7 Alexander Matviychuk 2014-04-30 21:13:40 UTC
- I already installed pygobject to get past the first error I got which was along the lines of "failed to import gi module". Installing pygobject fixed that but gave me the current issue, "'GtkDialogFlags' has no attribute 'NO_SEPARATOR'"

- I uninstalled pygobject and downgraded to electrum-1.9.7 and it works like a charm. This only affects 1.9.8.

So it appears that this is indeed an upstream issue. I will update the electrum devs with the new findings and hope they can fix it. At this point my understanding is there is nothing we can do to fix this error.
Comment 8 Rafał Mużyło 2014-04-30 21:45:26 UTC
Well, OK, there has been a mid-air collision here - comment 6 was after I've read the initial upstream reply, before I've noticed that a few hours later they did fix this problem in the commit mentioned in issue opened by the reporter.
Comment 9 Anthony Basile gentoo-dev 2014-04-30 21:47:09 UTC
(In reply to Rafał Mużyło from comment #8)
> Well, OK, there has been a mid-air collision here - comment 6 was after I've
> read the initial upstream reply, before I've noticed that a few hours later
> they did fix this problem in the commit mentioned in issue opened by the
> reporter.

Well I still need to fix the dependencies but there is something else going on.  Hopefull the upstream commit fixes it.  What's the commit url?
Comment 10 Alexander Matviychuk 2014-04-30 22:08:24 UTC
This is the commit they mentioned: https://github.com/spesmilo/electrum/commit/9facf2687ae0a1a697673192bd538550690708bf

But that commit doesn't fix the issue. Rafał Mużyło is right, they still need to remove "Gtk.DialogFlags.NO_SEPARATOR" according to the gtk docs:  https://developer.gnome.org/gtk3/unstable/gtk-migrating-2-to-3.html#id-1.6.3.3.4
Comment 11 Alexander Matviychuk 2014-04-30 22:47:21 UTC
Just to beat this dead horse into the ground. Here is what I did to get 1.9.8 to work:

1) emerge electrum
-> complains about missing import gi
2) emerge pygobject
-> complains about NO_SEPARATOR
3) vi /usr/lib64/python2.7/site-packages/electrum_gui/gtk.py
-> Removed the "|Gtk...NO_SEPARATOR" flag, saved file.

Electrum 1.9.8 now runs like a champ and has a nice gtk3 look. Hope this helps fix the package until the offical repo gets fixed.
Comment 12 Anthony Basile gentoo-dev 2014-05-01 11:16:04 UTC
(In reply to Alexander Matviychuk from comment #11)
> Just to beat this dead horse into the ground. Here is what I did to get
> 1.9.8 to work:
> 
> 1) emerge electrum
> -> complains about missing import gi
> 2) emerge pygobject
> -> complains about NO_SEPARATOR
> 3) vi /usr/lib64/python2.7/site-packages/electrum_gui/gtk.py
> -> Removed the "|Gtk...NO_SEPARATOR" flag, saved file.
> 
> Electrum 1.9.8 now runs like a champ and has a nice gtk3 look. Hope this
> helps fix the package until the offical repo gets fixed.

I can make these changes while we wait for upstream.
Comment 13 Sorrow 2014-06-07 12:57:08 UTC
So, shall anyone fix dependencies or maybe file a separate bug for this?
Comment 14 Anthony Basile gentoo-dev 2015-03-05 22:29:42 UTC
This should be fixed with 1.9.8-r1.  Can you test and reopen if there's still a problem.