NaturalHistoryMuseum / pylibdmtx

Read Data Matrix barcodes from Python 2 and 3.
MIT License
145 stars 56 forks source link

issue with pylibdmtx on Docker #55

Open NourdineMazali opened 4 years ago

NourdineMazali commented 4 years ago

Getting this error while trying to run pylibdmtx .encode() inside the official docker image python3.6 in docker environment :

File "/usr/local/lib/python3.6/site-packages/pylibdmtx/pylibdmtx.py", line 373, in encode encoder[0].image[0].pxl, ctypes.POINTER(ctypes.c_ubyte * size) ValueError: NULL pointer access

NourdineMazali commented 4 years ago

Fixed it by switching from a python image to continuumio/miniconda3 using the following in the Dockerfile: FROM continuumio/miniconda3 RUN apt-get update && \ apt-get install -y \ curl \ poppler-utils build-essential libgl1-mesa-glx \ imagemagick libsm-dev libdmtx-dev libdmtx0b