jbaiter / gphoto2-cffi

Python bindings for libgphoto2 with an idiomatic API
GNU Lesser General Public License v3.0
38 stars 17 forks source link

Error with Python3.5 #7

Closed thijstriemstra closed 8 years ago

thijstriemstra commented 8 years ago

I'm using Python 3.5.1 on Ubuntu 16.04and getting this error when trying to import the library:

>>> import gphoto2cffi
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/thijs/.virtualenvs/test/src/gphoto2-cffi/gphoto2cffi/__init__.py", line 1, in <module>
    from .gphoto2 import (Camera, list_cameras, supported_cameras,
  File "/home/thijs/.virtualenvs/test/src/gphoto2-cffi/gphoto2cffi/gphoto2.py", line 15, in <module>
    from . import errors, backend
  File "/home/thijs/.virtualenvs/test/src/gphoto2-cffi/gphoto2cffi/backend.py", line 56, in <module>
    'extract_exif': _lib.GP_FILE_OPERATION_EXIF})
  File "/usr/lib/python3.5/enum.py", line 237, in __call__
    return cls._create_(value, names, module=module, qualname=qualname, type=type, start=start)
  File "/usr/lib/python3.5/enum.py", line 337, in _create_
    enum_class = metacls.__new__(metacls, class_name, bases, classdict)
  File "/usr/lib/python3.5/enum.py", line 114, in __new__
    enum_class = super().__new__(metacls, cls, bases, classdict)
TypeError: type() argument 1 must be str, not bytes
>>> 
jbaiter commented 8 years ago

Thanks for the report, god knows why I had those descriptors as bytestrings, it works fine as a regular string on Python 2 as well.

thijstriemstra commented 8 years ago

Thanks! Could you also put out a new release?

jbaiter commented 8 years ago

Done, v0.3 should be up on PyPi!