cversek / python-FLI

Python bindings for Finger Lakes Instrumentation (FLI) cameras and peripherals.
MIT License
10 stars 11 forks source link

Problem with FLIList #2

Closed Lyeta closed 11 years ago

Lyeta commented 11 years ago

Hello,

first thank you for sharing your work with people wanting to use FLI devices with Python.

I have a problem with FLIList, for instance when I call: fws = USBFilterWheel.find_devices() as given in the test code in filter_wheel.py, I get the following error:

Traceback (most recent call last): File "<pyshell#14>", line 1, in fws = USBFilterWheel.find_devices() File "XX\python-FLI\src\FLI\device.py", line 50, in find_devices cls._libfli.FLIList(cls._domain, byref(tmplist)) #allocates memory ValueError: Procedure called with not enough arguments (8 bytes missing) or wrong calling convention

I am working on Windows, but I don't think this changes anything concerning how the procedure is called.. Did anybody else have such a problem? Do you have any clue?

Thank you for your help!

++

Lyeta commented 11 years ago

So it was a problem with the call of dll. For people using Windows as well, add in lib.py:

        elif sys.platform == 'win32':
            FLILibrary.__dll = windll.LoadLibrary("libfli")
cversek commented 11 years ago

Hi Lyeta, Sorry that I did not catch your message sooner but gmail didn't prioritize it for some reason and my PhD defense is in two days (!) so I've had other things on my plate. I see that maybe you have found a work-around. I haven't tested anything on Windows yet, but I will look into the matter this weekend. Thank you for your interest and let me know about your project.

On Thu, Feb 14, 2013 at 10:47 AM, Lyeta notifications@github.com wrote:

Hello,

first thank you for sharing your work with people wanting to use FLI devices with Python.

I have a problem with FLIList, for instance when I call: fws = USBFilterWheel.find_devices() as given in the test code in filter_wheel.py, I get the following error:

Traceback (most recent call last): File "", line 1, in fws = USBFilterWheel.find_devices() File "XX\python-FLI\src\FLI\device.py", line 50, in find_devices cls._libfli.FLIList(cls._domain, byref(tmplist)) #allocates memory ValueError: Procedure called with not enough arguments (8 bytes missing) or wrong calling convention

I am working on Windows, but I don't think this changes anything concerning how the procedure is called.. Did anybody else have such a problem? Do you have any clue?

Thank you for your help!

++ Julie

— Reply to this email directly or view it on GitHubhttps://github.com/cversek/python-FLI/issues/2.

Lyeta commented 11 years ago

Hello Craig,

thank you for your email. Don't be sorry, I posted this knowing that you had not worked on Windows, I wanted to see if anybody had used it on Windows and have had the same problem.

I have a filter wheel and a camera, and now I can control them using your files. I just have an error with the function set_temperature and I am wondering if set_bit_depth("8bit") really changes the bit depth. But as it turns out, I probably will use Matlab instead of Python for these devices, so I did not look carefully at these two things.

So I wish you a successful defense! And if you want we can exchange about utilization of your files under Windows afterwards.

Julie

cversek commented 11 years ago

Thanks for your bug reports, unfortunately I don't have easy access to an FLI camera at this time, so if you would like to check if the updates work that would be most appreciated.

I just have an error with the function set_temperature

this has been split into another issue with a possible fix https://github.com/cversek/python-FLI/issues/4

and I am wondering if set_bit_depth("8bit") really changes the bit depth.

likewise, this has become its own issuehttps://github.com/cversek/python-FLI/issues/3

And if you want we can exchange about utilization of your files under Windows afterwards.

I will look into this soon

  • Craig