Regression on python binding and HUB5000

Supporting Linux and other Unixes
Post Reply
JeffWitz
Fresh meat
Posts: 3
Joined: Tue Dec 17, 2024 7:39 am
Contact:

Regression on python binding and HUB5000

Post 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
User avatar
Patrick
Lead Developer
Posts: 647
Joined: Mon Jun 20, 2005 8:46 am
Location: Calgary
Contact:

Re: Regression on python binding and HUB5000

Post 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
JeffWitz
Fresh meat
Posts: 3
Joined: Tue Dec 17, 2024 7:39 am
Contact:

Re: Regression on python binding and HUB5000

Post 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.
User avatar
Patrick
Lead Developer
Posts: 647
Joined: Mon Jun 20, 2005 8:46 am
Location: Calgary
Contact:

Re: Regression on python binding and HUB5000

Post 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
User avatar
Patrick
Lead Developer
Posts: 647
Joined: Mon Jun 20, 2005 8:46 am
Location: Calgary
Contact:

Re: Regression on python binding and HUB5000

Post by Patrick »

I've recreated the bug with server discovery here. Looking into it.

-Patrick
User avatar
Patrick
Lead Developer
Posts: 647
Joined: Mon Jun 20, 2005 8:46 am
Location: Calgary
Contact:

Re: Regression on python binding and HUB5000

Post by Patrick »

Hi,

We have released a fix for this issue.

-Patrick
JeffWitz
Fresh meat
Posts: 3
Joined: Tue Dec 17, 2024 7:39 am
Contact:

Re: Regression on python binding and HUB5000

Post by JeffWitz »

Hello,

Release tested today, and it works !

A very big thanks for your incredible reactivity.

Happy Holidays
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests