Coder Social home page Coder Social logo

Comments (12)

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

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.

mdifonzo avatar mdifonzo commented on June 20, 2024

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.

mdifonzo avatar mdifonzo commented on June 20, 2024

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.

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

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.

mdifonzo avatar mdifonzo commented on June 20, 2024

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.

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

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.

mdifonzo avatar mdifonzo commented on June 20, 2024

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.

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

Curiouser and curiouser. Before removing those lines, can you send me (or attach) the gphoto2_camera_wrap.c file it produced.

from python-gphoto2.

mdifonzo avatar mdifonzo commented on June 20, 2024

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.

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

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.

mdifonzo avatar mdifonzo commented on June 20, 2024

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.

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

I hope I've sorted this out now. Will test more thoroughly in future!

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.