Coder Social home page Coder Social logo

Comments (5)

jim-easterbrook avatar jim-easterbrook commented on June 20, 2024

The _list module is the compiled C code and should be in the same directory as the Python module list.py. What's in the directory /usr/local/lib/python2.7/dist-packages/gphoto2/?

from python-gphoto2.

Nic2012 avatar Nic2012 commented on June 20, 2024

Later I have installed some other python stuff and libudev etc. and afterwards it runs fine, not sure what was really missing, the content is currently:

pi@pi64:~$ ls /usr/local/lib/python2.7/dist-packages/gphoto2
abilities_list.py   camera.pyc   _context.so  filesys.py   __init__.pyc  port_info_list.py   port_log.pyc  _result.so   widget.py
abilities_list.pyc  _camera.so   file.py      filesys.pyc  list.py       port_info_list.pyc  _port_log.so  version.py   widget.pyc
_abilities_list.so  context.py   file.pyc     _filesys.so  list.pyc      _port_info_list.so  result.py     version.pyc  _widget.so
camera.py           context.pyc  _file.so     __init__.py  _list.so      port_log.py         result.pyc    _version.so

I guess thats looks ok. Strange thing is on this distro I have to call the commands by sudo, no matter if its python-gphoto2 or the regular gphoto2 cli.

pi@pi64:~$ python /usr/local/share/python-gphoto2/examples/camera-summary.py
WARNING: gphoto2: (gp_libusb1_open [libusb1.c:392]) 'libusb_open (port->pl->d, &port->pl->dh)' failed: Access denied (insufficient permissions) (-3)
Traceback (most recent call last):
  File "/usr/local/share/python-gphoto2/examples/camera-summary.py", line 60, in <module>
    sys.exit(main())
  File "/usr/local/share/python-gphoto2/examples/camera-summary.py", line 33, in main
    gp.check_result(gp.gp_camera_init(camera, context))
  File "/usr/local/lib/python2.7/dist-packages/gphoto2/result.py", line 162, in check_result
    raise GPhoto2Error(error)
gphoto2.GPhoto2Error: [-7] I/O problem

from python-gphoto2.

jim-easterbrook avatar jim-easterbrook commented on June 20, 2024

The sudo requirement is possibly because of permissions on the USB port. You might need to add your regular user to a USB group, or add a udev rule to change the permissions.

from python-gphoto2.

Nic2012 avatar Nic2012 commented on June 20, 2024

Yeah, that makes sense, thank y for y support.

from python-gphoto2.

jim-easterbrook avatar jim-easterbrook commented on June 20, 2024

For future reference: I've just discovered (while experimenting with MSYS2 on Windows) that installing libtool can cure some module loading problems.

from python-gphoto2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.