Page 1 of 1

Regression on python binding and HUB5000

Posted: Tue Dec 17, 2024 8:53 am
by JeffWitz
Hello,

I'm on Ubuntu 24.04
If I use libpidget22 of 20240411 with the associated python binding I manage to have everything that works, but if I use libphidget22 20240912, then I can start a first time my python programs and when I quit and I relaunch I have this error :
Phidget22.PhidgetException.PhidgetException: PhidgetException 0x34 (Device not Attached)
This can happen for a number of common reasons. Be sure you are opening the channel before trying to use it. If you are opening the channel, the program may not be waiting for the channel to be attached. If possible use openWaitForAttachment. Otherwise, be sure to check the Attached property of the channel before trying to use it.
Nothing I try works. I am on the last firmware available

Re: Regression on python binding and HUB5000

Posted: Tue Dec 17, 2024 10:58 am
by Patrick
Hi,

Can you share your code, or a minimal example?

Can you enable library logging and share the results of pass/fail runs? https://www.phidgets.com/docs/Phidget_Logging

There were some changes in the server discovery code between those releases, so a bug could have been introduced. Are you using addServer or enableServerDiscovery to connect to the HUB5000?

-Patrick

Re: Regression on python binding and HUB5000

Posted: Tue Dec 17, 2024 11:08 am
by JeffWitz
Thanks for your quick answer.

Our main issue is that we don't use it directly in python, but with our in house platform crappy available on github at "LaboratoireMecaniqueLille/crappy"

So it is not obvious to provide you a minimal example, but I will try tomorrow.

we use

Code: Select all

    Net.enableServerDiscovery(PhidgetServerType.PHIDGETSERVER_DEVICEREMOTE)
feel free to tell me if there is a better way to init it.

Re: Regression on python binding and HUB5000

Posted: Wed Dec 18, 2024 11:08 am
by Patrick
Instead of enableServerDiscovery, you could call addServer. Server discovery is mostly useful for dynamic systems, where you don't know ahead of time what servers will be on the network.

Assuming your hub5000 has the default hostname:

Code: Select all

Net.addServer("hub5000", "hub5000.local", 5661, "", 0);
-Patrick

Re: Regression on python binding and HUB5000

Posted: Wed Dec 18, 2024 12:49 pm
by Patrick
I've recreated the bug with server discovery here. Looking into it.

-Patrick

Re: Regression on python binding and HUB5000

Posted: Thu Dec 19, 2024 1:27 pm
by Patrick
Hi,

We have released a fix for this issue.

-Patrick

Re: Regression on python binding and HUB5000

Posted: Fri Dec 20, 2024 7:45 am
by JeffWitz
Hello,

Release tested today, and it works !

A very big thanks for your incredible reactivity.

Happy Holidays