You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I installed libvips 8.6.2 from source, with pyvips 2.1.2 (ubuntu 16.04, python 3.6), and ran into the following error using pyvips (via gdal2mbtiles, which I am in the process of upgrading to use pyvips):
File "/venv/src/pyvips/pyvips/__init__.py", line 153, in <module>
from .gvalue import *
File "/venv//src/pyvips/pyvips/gvalue.py", line 26, in <module>
class GValue(object):
File "/venv/src/pyvips/pyvips/gvalue.py", line 60, in GValue
pyvips.vips_lib.vips_blend_mode_get_type()
AttributeError: cffi library '_libvips' has no function, constant or global variable named 'vips_blend_mode_get_type'
I can see in gvalue.py that vips_blend_mode_get_type is only wrapped for 8.6+. Installed 8.5.9 from source and everything worked fine.
In ipython shell:
In [1]: import pkgconfig
In [2]: pkgconfig.installed('vips', '==8.6.2')
Out[2]: True
In [3]: import pyvips
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-3-b1ec53e8f619> in <module>()
----> 1 import pyvips
~/venv/lib/python3.6/site-packages/pyvips/__init__.py in <module>()
151 from .base import *
152 from .gobject import *
--> 153 from .gvalue import *
154 from .vobject import *
155 from .vinterpolate import *
~/venv/lib/python3.6/site-packages/pyvips/gvalue.py in <module>()
24
25
---> 26 class GValue(object):
27
28 """Wrap GValue in a Python class.
~/venv/lib/python3.6/site-packages/pyvips/gvalue.py in GValue()
58
59 if at_least_libvips(8, 6):
---> 60 pyvips.vips_lib.vips_blend_mode_get_type()
61 blend_mode_type = type_from_name('VipsBlendMode')
62
AttributeError: cffi library '_libvips' has no function, constant or global variable named 'vips_blend_mode_get_type'
The text was updated successfully, but these errors were encountered:
It looks like your _libvips.so was generated for libvips 8.5.x. but you're using libvips 8.6.x, so it's trying to use an entry point that does not exist.
I would uninstall pyvips, install the latest libvips, then reinstall pyvips again with --no-cache-dir, to make sure that everything is regenerated.
Perhaps we should add another version check. The _libvips.so extension could record the version of libvips it was generated for (ie. the header version) and compare that to the version of libvips it links against at runtime.
git master pyvips now checks that the binary wrapper version matches the shared library version, and falls back to ABI mode if they don't. Hopefully that'll make this kind of error impossible.
Maybe similar to #33?
I installed libvips 8.6.2 from source, with pyvips 2.1.2 (ubuntu 16.04, python 3.6), and ran into the following error using pyvips (via gdal2mbtiles, which I am in the process of upgrading to use pyvips):
I can see in
gvalue.py
that vips_blend_mode_get_type is only wrapped for 8.6+. Installed 8.5.9 from source and everything worked fine.In ipython shell:
The text was updated successfully, but these errors were encountered: