Giter VIP home page Giter VIP logo

cubini's People

Contributors

schlabonski avatar

Stargazers

 avatar

Watchers

 avatar

cubini's Issues

NotImplementedError: Operation not supported or unimplemented on this platform

We're attempting to control a Thorlabs KPZ101 piezo controller using this, and are running into what appear to be pyusb or libusb NotImplementedErrors left and right that we don't know how to resolve.

When attempting to read the device serial number in KPZ101.init() ,
sn = usb.util.get_string(dev, 3, dev.iSerialNumber) throws the error.

If we bypass that and use the first device, we run into it again on this line:
com = ComPort(usb_device=kpz)

pyusb: 1.2.1, libusb: 1.0.26

I played around in pyusb, and found that I could retrieve the device and retrieve some fields such as dev.iSerialNumber and dev.idProduct, but many of the pyusb fields returned the error as well. Any suggestions would be appreciated.

Traceback (most recent call last):
File "C:/Users/JeremyBrown_db259ax/AppData/Roaming/JetBrains/PyCharmCE2021.2/scratches/scratch_15_thorlabs_piezo.py", line 10, in
kpz = KPZ101()
File "c:\users\jeremybrown_db259ax\code\cubini-main\cubini\KPZ101.py", line 35, in init
com = ComPort(usb_device=kpz)
File "c:\users\jeremybrown_db259ax\code\cubini-main\cubini\vcp_terminal.py", line 66, in init
usb_device.set_configuration()
File "C:\ProgramData\Anaconda3\lib\site-packages\usb\core.py", line 915, in set_configuration
self._ctx.managed_set_configuration(self, configuration)
File "C:\ProgramData\Anaconda3\lib\site-packages\usb\core.py", line 113, in wrapper
return f(self, *args, **kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\usb\core.py", line 158, in managed_set_configuration
self.managed_open()
File "C:\ProgramData\Anaconda3\lib\site-packages\usb\core.py", line 113, in wrapper
return f(self, *args, **kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\usb\core.py", line 131, in managed_open
self.handle = self.backend.open_device(self.dev)
File "C:\ProgramData\Anaconda3\lib\site-packages\usb\backend\libusb1.py", line 804, in open_device
return _DeviceHandle(dev)
File "C:\ProgramData\Anaconda3\lib\site-packages\usb\backend\libusb1.py", line 652, in init
_check(_lib.libusb_open(self.devid, byref(self.handle)))
File "C:\ProgramData\Anaconda3\lib\site-packages\usb\backend\libusb1.py", line 600, in _check
raise NotImplementedError(_strerror(ret))
NotImplementedError: Operation not supported or unimplemented on this platform

cannot find kpz101 even if it is found using tholab's Kinesis software

Hi,
I have some difficult of using this library. I have a kpz101 cube and it can be found and used in Thorlab's Kinesis sofware. But When I using this python library and it cannot find the kpz101 cube. I've double checked the serial number and it is correct. This is the error message. Could you please let me know how to solve the issue? Thank you very much in advance.
"No KPZ101 with matching serial number 29501195 found!
KPZ101 29501195 not found."
image

`__del__` method in `KPZ101` class error

The __del__(self) method calls for #self.com.disconnect() which calls self.device.attach_kernel_driver(0) in vcp_terminal.py which calls self._ctx.backend.attach_kernel_driver() in core.py. The attach_kernel_driver() method is not implemented in the core.py and raises a Not_Implemented exception when called.
This bug appears to be because core.py is not up to date ? Any known solutions ?

I tried a ''hack'' by simply commenting out the line ant it seems to work so far... but it is not ideal.

Found this similar problem being discussed here but it does not seem to apply in this case.

PyUSB(v1.2.1) and LibUSB (v1.0.24) all up to date, installed via anaconda. Using Python 3.8.12 on Windows 10 64-bit.

Max voltage not set in initialize

When set_ouput_voltage() is called before set_max_voltage it will throw an error. This could be fixed by reading the current voltage limit from the device and setting it during initialization.

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.