Skip to content

Trouble creating custom source (CFFI AttributeError) #218

@lizzielizzielizzie

Description

@lizzielizzielizzie

Hi. I'm using a python docker container that runs on alpine (python:3.8.1-alpine) and trying to create a custom source, bur it crashes every time:

>>> src = pyvips.SourceCustom()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.8/site-packages/pyvips/vsourcecustom.py", line 24, in __init__
    source = ffi.cast('VipsSource*', vips_lib.vips_source_custom_new())
AttributeError: cffi library '_libvips' has no function, constant or global variable named 'vips_source_custom_new'

Some debugging output:

$ pip show pyvips
Creating nucleo_django_run ... done
PostgreSQL is available
sh: show: unknown operand
Name: pyvips
Version: 2.1.12
Summary: binding for the libvips image processing library, API mode
Home-page: https://github.com/libvips/pyvips
Author: John Cupitt
Author-email: jcupitt@gmail.com
License: MIT
Location: /usr/local/lib/python3.8/site-packages
Requires: pkgconfig, cffi
>>> _libvips.lib.VIPS_MAJOR_VERSION
8
>>> _libvips.lib.VIPS_MINOR_VERSION
8
>>> _libvips.lib.VIPS_MICRO_VERSION
4

in our compose:
Screen Shot 2020-12-14 at 5 18 34 PM
Screen Shot 2020-12-14 at 5 18 50 PM

and finally, our pipfile haspyvips==2.1.12 required

With this setup i've been able to do some other operations usingpyvips, but creating the custom source hasn't been successful. Please let me know if there's something I'm overlooking or if there's more information that could be helpful. I can also try setting up a full repository to reproduce the issue if needed. All ideas are welcome and appreciated 🙂

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions