You are not logged in.

#1 2014-04-27 16:13:16

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,688
Website

python folks: missing dependency but unsure what is needed

I recently adopted macrofusion which is a python3 based script.  The README from upstream details a set of dependencies which I believe I have satisfied.  The script however does not run giving a pretty general error:

An error occured. Python or one of its sub modules is absent...
It would be wise to check your python installation.

Would be grateful if some python coders could take a look at the script and help me figure-out what dep is missing.  To make it easy on you, I posted the code to the script here.


Excerpt from README:

- python (>=3)
- Pillow (fork of PIL) (python3-imaging)
- gexiv2 (gir1.2-gexiv2)
- exiftool (libimage-exiftool-perl)
- enfuse (>=4.0)
- hugin-tools (with align_image_stack)

Arch packages I put together as deps:

depends=('python' 'python-pillow' 'exiv2' 'perl-image-exiftool'
'enblend-enfuse' 'hugin' 'pyexiv2')

Thanks.

Last edited by graysky (2014-04-27 16:15:05)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#2 2014-04-27 16:23:24

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,965
Website

Re: python folks: missing dependency but unsure what is needed

ERROR:root:Could not find any typelib for GExiv2
Traceback (most recent call last):
  File "./macrofusion", line 20, in <module>
    from gi.repository import Gdk, Gtk, GObject, GdkPixbuf, GExiv2
ImportError: cannot import name 'GExiv2'

It's failing to find something named GExiv2 in gi.repository. You'll have to figure out where that is (or if it's been renamed) and modify the import line accordingly.

If you contact upstream, suggest that they either remove the try-except block around the imports (which is pointless imo for required imports and should only be used for optional ones) or that they catch the exception and print it, e.g.

except ImportError as e:
  sys.exit('Blah blah blah some pointless error message [{}]'.format(e))

My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#3 2014-04-27 16:26:06

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,688
Website

Re: python folks: missing dependency but unsure what is needed

Thanks, Xyne.  Could it be that our gexiv2 package is not supplying something it should?

https://projects.archlinux.org/svntogit … ages/exiv2

Last edited by graysky (2014-04-27 16:27:20)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#4 2014-04-27 19:03:07

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,965
Website

Re: python folks: missing dependency but unsure what is needed

I don't know. I went grepping through exiv2 and python2-exiv2 to see if I could find what it's looking for but I was unsuccessful. I am not familiar with scons which is what is used to build python2-exiv2. Does that package provide Python 3 bindings (via scons?)?. I suspect that it doesn't due to the "python2-" prefix. Perhaps you should ask the python2-exiv2 maintainer about this.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#5 2014-04-27 19:22:44

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,688
Website

Re: python folks: missing dependency but unsure what is needed

Thanks.  I emailed him and cc'ed you.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

Board footer

Powered by FluxBB