ColourPicker icon indicating copy to clipboard operation
ColourPicker copied to clipboard

Is this working on the latest Ubuntu?

Open matheo opened this issue 5 years ago • 5 comments

After upgrading my system, the color picker freezes the screen when I press "Pick".

I've tried to compile from the source, but I got this error after a successful install:

$ pick-colour-picker 
/usr/local/lib/python3.7/dist-packages/pick_colour_picker-1.0-py3.7.egg/pick/__main__.py:5: PyGIWarning: Unity was imported without specifying a version first. Use gi.require_version('Unity', '7.0') before import to ensure that the right version gets loaded.
Traceback (most recent call last):
  File "/usr/local/bin/pick-colour-picker", line 11, in <module>
    load_entry_point('pick-colour-picker==1.0', 'gui_scripts', 'pick-colour-picker')()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 489, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2793, in load_entry_point
    return ep.load()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2411, in load
    return self.resolve()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2417, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/local/lib/python3.7/dist-packages/pick_colour_picker-1.0-py3.7.egg/pick/__main__.py", line 15, in <module>
ModuleNotFoundError: No module named 'colours'

compile instructions in the README would be nice tho. Thanks!

matheo avatar Jun 13 '19 23:06 matheo

Ah, the setup.py may need updating; thank you for that. I would suggest you install it from the snap store, though, which is the version I myself use so you know it'll work. I'll take a look at the manual setup when I get a chance, though; thank you for the pointer.

stuartlangridge avatar Jun 13 '19 23:06 stuartlangridge

OK, short answer: someone who knows about setup.py files would doubtless easily be able to fix this bug, but that seemingly isn't me; as far as I'm aware, it ought to work and it isn't, so hopefully someone else will know what I need to add to setup.py to pick up the new files in pick, colours.py and snark.py, as well as __main__.py. I don't know why it's freezing for you, but you should be able to run pick from its checkout folder without installing it, with python -m pick, which may help debug the issue?

stuartlangridge avatar Jun 14 '19 08:06 stuartlangridge

I ran it with python -m pick and I got these warnings:

/pick/__main__.py:5: PyGIWarning: Unity was imported without specifying a version first. Use gi.require_version('Unity', '7.0') before import to ensure that the right version gets loaded.
  from gi.repository import Unity

(__main__.py:12997): Gtk-WARNING **: 14:36:09.448: Theme parsing error: <data>:12:31: The :focused pseudo-class is deprecated. Use :focus instead.

when I close it:

(__main__.py:12997): Gtk-CRITICAL **: 14:36:56.671: gtk_main_quit: assertion 'main_loops != NULL' failed

and when I try to pick a color with the Pick button, my computer just freezes with no chance to log the exception output :(

Update

With the snap version I get:

/usr/lib/python2.7/dist-packages/pick/__main__.py: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.
  from gi.repository import Gtk, Gdk, GLib, GdkPixbuf, Gio
/usr/lib/python2.7/dist-packages/pick/__main__.py:3: PyGIWarning: Unity was imported without specifying a version first. Use gi.require_version('Unity', '7.0') before import to ensure that the right version gets loaded.
  from gi.repository import Unity

(pick-colour-picker:10307): Gtk-WARNING **: 14:53:25.618: Theme parsing error: <data>:12:31: The :focused pseudo-class is deprecated. Use :focus instead.

and my Gnome still freezes, something is wrong with my desktop manager after the upgrade maybe

Thanks @stuartlangridge!

matheo avatar Jun 15 '19 19:06 matheo

  • Unity was imported without specifying a version first. is fixed via https://github.com/stuartlangridge/ColourPicker/pull/56/commits/ed77b4b96c341a6edda6b657b45c597c3f1a8e41
  • The :focused pseudo-class is deprecated. Use :focus instead. is fixed via https://github.com/stuartlangridge/ColourPicker/pull/56/commits/acf08bbd54f806e44ffa08118cab8d991bd33362

flexiondotorg avatar Jun 20 '19 12:06 flexiondotorg

Thank you so much @flexiondotorg!

matheo avatar Jun 20 '19 16:06 matheo