jim-easterbrook / Photini

An easy to use digital photograph metadata (Exif, IPTC, XMP) editing application.
https://photini.readthedocs.io/
GNU General Public License v3.0
157 stars 24 forks source link

Photini doesn't start on Fedora 23 #23

Closed Mebus closed 7 years ago

Mebus commented 8 years ago

I get this error message:

mebus@box ~ (git)-[home] % photini
/usr/lib/python2.7/site-packages/keyring/backends/Gnome.py:6: 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.
  from gi.repository import GnomeKeyring
Traceback (most recent call last):
  File "/usr/bin/photini", line 9, in <module>
    load_entry_point('Photini==2016.5.0', 'gui_scripts', 'photini')()
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 558, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2682, in load_entry_point
    return ep.load()
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2355, in load
    return self.resolve()
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2361, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/lib/python2.7/site-packages/photini/editor.py", line 47, in <module>
    from .facebook import FacebookUploader
  File "/usr/lib/python2.7/site-packages/photini/facebook.py", line 27, in <module>
    import keyring
  File "/usr/lib/python2.7/site-packages/keyring/__init__.py", line 12, in <module>
    from .core import (set_keyring, get_keyring, set_password, get_password,
  File "/usr/lib/python2.7/site-packages/keyring/core.py", line 158, in <module>
    init_backend()
  File "/usr/lib/python2.7/site-packages/keyring/core.py", line 58, in init_backend
    set_keyring(load_config() or _get_best_keyring())
  File "/usr/lib/python2.7/site-packages/keyring/core.py", line 66, in _get_best_keyring
    keyrings = backend.get_all_keyring()
  File "/usr/lib/python2.7/site-packages/keyring/util/__init__.py", line 24, in wrapper
    func.always_returns = func(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/keyring/backend.py", line 179, in get_all_keyring
    _load_backends()
  File "/usr/lib/python2.7/site-packages/keyring/backend.py", line 139, in _load_backends
    list(map(_load_backend, backends))
  File "/usr/lib/python2.7/site-packages/keyring/backend.py", line 124, in _load_backend
    mod = importlib.import_module('.'+name, package)
  File "/usr/lib64/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/usr/lib/python2.7/site-packages/keyring/backends/kwallet.py", line 13, in <module>
    from PyKDE4.kdeui import KWallet
RuntimeError: the PyQt4.QtCore and PyQt5.QtCore modules both wrap the QObject class

Mebus

jim-easterbrook commented 8 years ago

This is a problem with python-keyring. I've seen the 2nd error ("the PyQt4.QtCore and PyQt5.QtCore modules both wrap the QObject class") before and I believe python-keyring version 7.0 or later should fix it. See https://github.com/jaraco/keyring/issues/170

If the first error persists after you upgrade python-keyring then one of us needs to file a bug on python-keyring. I'm happy to do it if I can reproduce the problem.

jim-easterbrook commented 8 years ago

Mebus, did you make any progress with solving this problem?

Mebus commented 8 years ago

No.

jim-easterbrook commented 8 years ago

What version of python-keyring are you using?

Mebus commented 8 years ago

Hi! I am using "python-keyring-5.0-2.fc23.noarch".

This is interesting:

Python 2.7.11 (default, Mar 31 2016, 20:46:51) 
[GCC 5.3.1 20151207 (Red Hat 5.3.1-2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import keyring
/usr/lib/python2.7/site-packages/keyring/backends/Gnome.py:6: 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.
  from gi.repository import GnomeKeyring
>>> 

Greetings

Mebus

jim-easterbrook commented 8 years ago

If you upgrade python-keyring to 7.0 or later then Photini should work. The 'PyGIWarning' message is just a warning and can be ignored. (It's to encourage authors of packages that import glib stuff to explicitly state the version they want.) An alternative would be to remove python-qt5, but I think that's more likely to cause problems for other software.

cboehm-it commented 7 years ago

Hi!

I got the same error: RuntimeError: the PyQt4.QtCore and PyQt5.QtCore modules both wrap the QObject class

When I check the version of python-keyring, it's already 7.3 python-keyring (7.3-1ubuntu1)

Is there any way that Photini works?

jim-easterbrook commented 7 years ago

I'm using it without any problem on Linux Mint (an Ubuntu based system) so it should be possible. Note that Photini will fall back to using PyQt4 if it fails to import all the required parts of PyQt5, which might also be causing this. A possible missing component could be qt5-webkit.