Comments (9)
I just tried it on my Pi and got the same result. It's got an earlier version of SWIG (2.0.7) than I've been using on my main machine (2.0.10). The problem is in the typemaps for gp_port_info_new(), which I don't think would ever be called from Python, so doesn't really need wrapping. (But who knows what someone might want to do...)
I'll commit a bug fix now.
from python-gphoto2.
PS I haven't tested any image capture stuff - you may find things you need are missing or "not properly joined up". Do let me know of any problems you run into.
from python-gphoto2.
Thanks Jim.
Will do.
from python-gphoto2.
Thanks Jim, I got the same issue but on ubuntu 12.04 with default swig 2.04 installation.
from python-gphoto2.
Got this issue arising now:
*gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c source/lib/gphoto2_camera_wrap.c -o build/temp.linux-armv6l-2.7/source/lib/gphoto2_camera_wrap.o -O3 -Wno-unused-variable
source/lib/gphoto2_camera_wrap.c: In function ‘_wrap_gp_camera_get_port_info’:
source/lib/gphoto2_camera_wrap.c:5536:5: error: incompatible type for argument 2 of ‘SWIG_Python_NewPointerObj’
source/lib/gphoto2_camera_wrap.c:2547:1: note: expected ‘void ’ but argument is of type ‘GPPortInfo’
error: command 'gcc' failed with exit status 1
gcc version 4.6.3 (Debian 4.6.3-14+rpi1)
and
SWIG Version 2.0.7
and python 2.7.3
from python-gphoto2.
Doh! The perils of testing on one machine and committing to GitHub from a different one. I removed the wrong asterisk in commit 9e7f9f2. This is still the same problem. Commit 533eb33 should fix it.
from python-gphoto2.
Unfortunately, although this change allows it to compile with older SWIG versions, it causes a segfault when gp_camera_set_port_info() is called. Some more work needed.
from python-gphoto2.
I think I've found the problem. It's nothing to do with SWIG, it's the version of libgphoto2. The API changed in version 2.5 (see http://www.gphoto.org/news/) - my Pi only has version 2.4.14. I'm surprised I managed to build python-gphoto2 at all. You certainly need version 2.5 to run the example programs.
(The difference responsible for this bug is that in 2.5 GPPortInfo is a pointer to a structure, in 2.4 it's the structure itself. Quite a big difference!)
from python-gphoto2.
Commit 9d1f71e allows building with gphoto2 version 2.4 or 2.5. Some of the examples work with version 2.4 as well (tested with my Canon DSLR connected to a Raspberry Pi).
from python-gphoto2.
Related Issues (20)
- Missing pre-req's(?) after building libgphoto2 from source on Raspberry Pi HOT 3
- Can not set datetime on Canon EOS 1200D HOT 4
- equivalent of gphoto2 --reset HOT 1
- delete a file HOT 2
- gp_camera_get_single_config HOT 2
- Socket error after gp_camera_exit in windows/msys2 HOT 15
- Faster way to copy files from camera HOT 7
- Sony FX3 overshoot HOT 1
- `delete_file()` does not delete file HOT 9
- Segmentation Fault segfault on gp.Camera.autodetect() on Github Actions Runner HOT 21
- LGPL vs. GPL license? HOT 8
- Test Virtual Camera HOT 4
- Missing bindings for gp_port_new, gp_port_open, and gp_port_reset? HOT 2
- capture_preview() broken in v2.5.0 HOT 4
- having trouble getting gphoto2 on rpi HOT 3
- use python-gphoto2 in Windows system HOT 1
- Always connected capture anytime HOT 1
- Github Actions Python 3.12 environment. HOT 1
- Is live data acquisition available in the library? HOT 1
- Error When Installing with "Local" libgphoto2 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-gphoto2.