Giter Club home page Giter Club logo

Comments (7)

mapoga avatar mapoga commented on July 4, 2024 2

You were right, the 2 versions of libgphoto2_port.so created the problem. Right now python gphoto2 seems to behave normally. I get and error(which i did not have before) but its coming from the CLI as well. A quick search on the web indicates a udev/hwdb related problem. I will have to investigate since im new to everything linux. Thanks a lot for your help! Here are some related info:

What i did in order to try and fix the 2 versions of libgphoto2_port.so:

sudo pip uninstall gphoto2
sudo apt-get purge libgphoto2-2-dev
wget https://raw.githubusercontent.com/gonzalo/gphoto2-updater/master/gphoto2-updater.sh && chmod +x gphoto2-updater.sh && sudo ./gphoto2-updater.sh

Here is the ldd:
gphoto2

pi@raspberrypi_01:/usr/local/bin $ ldd gphoto2
        linux-vdso.so.1 (0x7ed93000)
        /usr/lib/arm-linux-gnueabihf/libarmmem.so (0x76f74000)
        libgphoto2.so.6 => /usr/local/lib/libgphoto2.so.6 (0x76ed2000)
        libgphoto2_port.so.12 => /usr/local/lib/libgphoto2_port.so.12 (0x76eb9000)
        libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0x76e91000)
        libexif.so.12 => /usr/lib/arm-linux-gnueabihf/libexif.so.12 (0x76e4e000)
        libpopt.so.0 => /lib/arm-linux-gnueabihf/libpopt.so.0 (0x76e33000)
        libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0x76db7000)
        libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0x76c76000)
        libltdl.so.7 => /usr/lib/arm-linux-gnueabihf/libltdl.so.7 (0x76c5e000)
        /lib/ld-linux-armhf.so.3 (0x54ab7000)
        libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0x76c4b000)

_camera.so

pi@raspberrypi_01:/usr/local/lib/python2.7/dist-packages/gphoto2 $ ldd _camera.so
        linux-vdso.so.1 (0x7ed6d000)
        /usr/lib/arm-linux-gnueabihf/libarmmem.so (0x76f81000)
        libgphoto2.so.6 => /usr/local/lib/libgphoto2.so.6 (0x76edf000)
        libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0x76e64000)
        libgphoto2_port.so.12 => /usr/local/lib/libgphoto2_port.so.12 (0x76e4b000)
        libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0x76e23000)
        libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0x76ce2000)
        /lib/ld-linux-armhf.so.3 (0x54b3e000)
        libltdl.so.7 => /usr/lib/arm-linux-gnueabihf/libltdl.so.7 (0x76cc9000)
        libexif.so.12 => /usr/lib/arm-linux-gnueabihf/libexif.so.12 (0x76c86000)
        libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0x76c73000)

Error from gphoto --summary:

pi@raspberrypi_01:/usr/local/bin $ gphoto2 --summary

*** Error ***
PTP I/O Error
*** Error (-7: 'I/O problem') ***

Error from python gphoto:

pi@raspberrypi_01:/usr/local/share/python-gphoto2/examples $ python camera-summary.py
WARNING: gphoto2: (gp_port_usb_close [libusb.c:325]) Invalid parameters: 'port && port->pl->dh' is NULL/FALSE.
WARNING: gphoto2: (camera_summary [library.c:5771]) 'ptp_getdeviceinfo (params, &pdi)' failed: 'PTP I/O Error' (0x02ff)
WARNING: gphoto2: (gp_context_error) PTP I/O Error
WARNING: gphoto2: (gp_camera_get_summary [gphoto2-camera.c:1244]) 'camera->functions->summary (camera, summary, context)' failed: -7
Traceback (most recent call last):
  File "camera-summary.py", line 59, in <module>
    sys.exit(main())
  File "camera-summary.py", line 33, in main
    text = gp.check_result(gp.gp_camera_get_summary(camera))
  File "/usr/local/lib/python2.7/dist-packages/gphoto2/result.py", line 159, in check_result
    raise gphoto2.GPhoto2Error(error)
gphoto2.GPhoto2Error: [-7] I/O problem

from python-gphoto2.

mapoga avatar mapoga commented on July 4, 2024

As it might be asked, here is what is listed in "/usr/local/lib/python2.7/dist-packages/gphoto2".

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

from python-gphoto2.

jim-easterbrook avatar jim-easterbrook commented on July 4, 2024

Find the gphoto2 command executable (with which gphoto2) and run ldd on it to see which gphoto2 libraries it's using, then run ldd on _camera.so and check it's using exactly the same libraries.

from python-gphoto2.

mapoga avatar mapoga commented on July 4, 2024

Thanks a lot for your help. I wouldn't even know where to begin otherwise.
Here is what is got:

Versions:
This version of gphoto2 is using the following software versions and options:
gphoto2 2.5.15 gcc, popt(m), exif, no cdk, no aa, no jpeg, no readline
libgphoto2 2.5.4 all camlibs, gcc, ltdl, EXIF
libgphoto2_port 0.12.0 iolibs: disk ptpip serial usb usbdiskdirect usbscsi, gcc, ltdl, USB, serial without locking

gphoto2
pi@raspberrypi_01:/usr/local/bin $ ldd gphoto2
linux-vdso.so.1 (0x7ee06000)
/usr/lib/arm-linux-gnueabihf/libarmmem.so (0x76f65000)
libgphoto2.so.6 => /usr/lib/arm-linux-gnueabihf/libgphoto2.so.6 (0x76ec8000)
libgphoto2_port.so.12 => /usr/local/lib/libgphoto2_port.so.12 (0x76eaf000)
libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0x76e87000)
libexif.so.12 => /usr/lib/arm-linux-gnueabihf/libexif.so.12 (0x76e44000)
libpopt.so.0 => /lib/arm-linux-gnueabihf/libpopt.so.0 (0x76e29000)
libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0x76dad000)
libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0x76c6c000)
libgphoto2_port.so.10 => /usr/lib/arm-linux-gnueabihf/libgphoto2_port.so.10 (0x76c54000)
libltdl.so.7 => /usr/lib/arm-linux-gnueabihf/libltdl.so.7 (0x76c3c000)
/lib/ld-linux-armhf.so.3 (0x54adb000)
libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0x76c29000)

_camera.so
pi@raspberrypi_01:/usr/local/lib/python2.7/dist-packages/gphoto2 $ ldd _camera.so
linux-vdso.so.1 (0x7eed5000)
/usr/lib/arm-linux-gnueabihf/libarmmem.so (0x76f49000)
libgphoto2.so.6 => /usr/lib/arm-linux-gnueabihf/libgphoto2.so.6 (0x76eac000)
libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0x76e31000)
libgphoto2_port.so.12 => /usr/local/lib/libgphoto2_port.so.12 (0x76e18000)
libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0x76df0000)
libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0x76caf000)
/lib/ld-linux-armhf.so.3 (0x54aaa000)
libgphoto2_port.so.10 => /usr/lib/arm-linux-gnueabihf/libgphoto2_port.so.10 (0x76c96000)
libltdl.so.7 => /usr/lib/arm-linux-gnueabihf/libltdl.so.7 (0x76c7e000)
libexif.so.12 => /usr/lib/arm-linux-gnueabihf/libexif.so.12 (0x76c3b000)
libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0x76c28000)

All i can see is that "libpopt.so.0" doesnt have a match in "_camera"

from python-gphoto2.

jim-easterbrook avatar jim-easterbrook commented on July 4, 2024

I suggested the ldd tests as there were similar problems in #46. As you say, both are using the same libraries. I'm slightly worried that they are both linking to two versions of libgphoto2_port.so, one of which is in `/usr/local/lib', unlike all the other libraries. But as gphoto2 is working that may not be a problem.

It might be worth trying a forced reinstall of python-gphoto2:

sudo pip install -v -U --force-reinstall gphoto2

from python-gphoto2.

mapoga avatar mapoga commented on July 4, 2024

The force reinstall went successfully but nothing has changed.

from python-gphoto2.

jim-easterbrook avatar jim-easterbrook commented on July 4, 2024

I'm still worried that you seem to have bits of two different versions of libgphoto2 installed. I suspect the updater script you used will have installed the headers anyway, so there may be no need to install libgphoto2-2-dev afterwards, especially as it may install the old version of libgphoto2 as a dependency.

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.