mabl / PyPylon

An experimental python wrapper around the Basler Pylon 5 library
BSD 3-Clause "New" or "Revised" License
53 stars 34 forks source link

build issue: PermissionError in factory #1

Closed maxlklaxl closed 8 years ago

maxlklaxl commented 8 years ago

I get this error while building

$ python setup.py build
running build
running build_py
running build_ext
skipping 'cython/version.cpp' Cython extension (up-to-date)
cythoning cython/factory.pyx to cython/factory.cpp

Error compiling Cython file:
------------------------------------------------------------
...

        if node == NULL:
            raise KeyError('Key does not exist')

        if not node_is_readable(node):
            raise PermissionError('Key is not readable')
                                ^
------------------------------------------------------------

cython/factory.pyx:90:33: undeclared name not builtin: PermissionError
building 'pypylon.cython.factory' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/opt/pylon5/include -I/usr/include/python2.7 -c cython/factory.cpp -o build/temp.linux-x86_64-2.7/cython/factory.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
cython/factory.cpp:1:2: error: #error Do not use this file, it is the result of a failed Cython compilation.
error: command 'gcc' failed with exit status 1
mabl commented 8 years ago

Against which Python version did you build? I see that PermissionError was introduced in Python 3.3.

mabl commented 8 years ago

Ah I just saw you are building with python 2.7. I've not designed the code for Python 2 yet, but rather tried to get it running with 3 first and then possibly backport. Could you try python 3?

mabl commented 8 years ago

Okay it should build with Python 2 now. Not tested with camera however.