Comments (12)
This is one of the API changes I made. gp_camera_capture now creates and returns the path. So your gp_camera_capture(camera, type, path, context) -> int
becomes gp_camera_capture(camera, type, context) -> int, CameraFilePath
Or have I misunderstood the GPhoto2 documentation and path is a parameter, not an output?
from python-gphoto2.
Gotcha. I'll update accordingly. Thanks!
On Sep 7, 2014, at 2:38 AM, Jim Easterbrook [email protected] wrote:
This is one of the API changes I made. gp_camera_capture now creates and returns the path. So your gp_camera_capture(camera, type, path, context) -> int becomes gp_camera_capture(camera, type, context) -> int, CameraFilePath
Or have I misunderstood the GPhoto2 documentation and path is a parameter, not an output?
—
Reply to this email directly or view it on GitHub.
from python-gphoto2.
Hmm, I still can't get that to work. It seems like the return value is not the same as what I was getting from gp.CameraFilePath() so I can't get the folder / file name attributes when I try to call gp_camera_file_get()? I'll take another look.
from python-gphoto2.
Hmm, maybe this isn't working as I expected. Can you see what type the returned value actually has? (print type(path))
from python-gphoto2.
I’m getting type = list on the path. This makes sense since it should be returning [int, CameraFilePath *]. When I check the type for path[1], I am getting type = ‘SwigPyObject’.
On Sep 7, 2014, at 10:08 AM, Jim Easterbrook [email protected] wrote:
Hmm, maybe this isn't working as I expected. Can you see what type the returned value actually has? (print type(path))
—
Reply to this email directly or view it on GitHub.
from python-gphoto2.
Ah, that's less than helpful. I guess your other GPhoto2 objects also have ‘SwigPyObject’ type as well.
For now you should delete lines 54 to 62 of src/gphoto2/lib/gphoto2_camera.i, recompile and install and go back to passing path in to gp_camera_capture. I'll try to work out what's going on later this week.
from python-gphoto2.
Thanks. I’ll try that. Here is what I get from the following (which is what I was using before):
campath = gp.CameraFilePath()
print (type(campath))
<class 'gphoto2.lib.gphoto2_camera.CameraFilePath’>
On Sep 7, 2014, at 10:19 AM, Jim Easterbrook [email protected] wrote:
Ah, that's less than helpful. I guess your other GPhoto2 objects also have ‘SwigPyObject’ type as well.
For now you should delete lines 54 to 62 of src/gphoto2/lib/gphoto2_camera.i, recompile and install and go back to passing path in to gp_camera_capture. I'll try to work out what's going on later this week.—
Reply to this email directly or view it on GitHub.
from python-gphoto2.
Curiouser and curiouser. Before removing those lines, can you send me (or attach) the gphoto2_camera_wrap.c file it produced.
from python-gphoto2.
Sure thing. Here you go:
On Sep 7, 2014, at 10:25 AM, Jim Easterbrook [email protected] wrote:
Curiouser and curiouser. Before removing those lines, can you send me (or attach) the gphoto2_camera_wrap.c file it produced.
—
Reply to this email directly or view it on GitHub.
from python-gphoto2.
OK. I didn't spot anything untoward in the generated wrapper, but I've managed to reproduce a similar error (AttributeError: 'SwigPyObject' object has no attribute 'text') with another returned value by dropping the -builtin SWIG option. You'd better drop back to commit 5f3ca75 until I sort out what's going on.
from python-gphoto2.
Will do. Thanks.
On Sep 7, 2014, at 10:43 AM, Jim Easterbrook [email protected] wrote:
OK. I didn't spot anything untoward in the generated wrapper, but I've managed to reproduce a similar error (AttributeError: 'SwigPyObject' object has no attribute 'text') with another returned value by dropping the -builtin SWIG option. You'd better drop back to commit 5f3ca75 until I sort out what's going on.
—
Reply to this email directly or view it on GitHub.
from python-gphoto2.
I hope I've sorted this out now. Will test more thoroughly in future!
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.