CaptureSingleFrameTo error

Discussions on extending SharpCap using the built in Python scripting functionality
Post Reply
denjoan
Posts: 5
Joined: Sat Jan 27, 2018 2:10 am

CaptureSingleFrameTo error

Post by denjoan » Sat Jan 27, 2018 2:16 am

When I execute the following command:
SharpCap.SelectedCamera.CaptureSingleFrameTo("c:\test.fits")

I get the error message:
Path must be an absolute path

Not sure why I get this message.

Thank you.

Dennis

User avatar
admin
Site Admin
Posts: 1742
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: CaptureSingleFrameTo error

Post by admin » Sat Jan 27, 2018 11:57 am

Hi,

I think that the python language is interpreting 'c:\test.fits' as 'c:<tab>est.fits' since '\t' is the way to put a tab in a python string. Try 'c:\\test.fits' - I think that's the right way to do it.

cheers,

Robin

denjoan
Posts: 5
Joined: Sat Jan 27, 2018 2:10 am

Re: CaptureSingleFrameTo error

Post by denjoan » Sat Jan 27, 2018 12:11 pm

Hi Robin,

Actually, I found that if "/" is used instead of "\", it works - must be a Windows file naming thing.

Thanks anyway for your response.

Dennis

denjoan
Posts: 5
Joined: Sat Jan 27, 2018 2:10 am

Re: CaptureSingleFrameTo error

Post by denjoan » Sat Jan 27, 2018 12:13 pm

Hi Robin,

BTW: your suggestion works as well.

Dennis

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest