SBC3 PhidgetHelperFunctions Python module?

General PhidgetSBC Discussion.
Post Reply
dannereau
Fresh meat
Posts: 3
Joined: Thu May 03, 2018 9:57 pm
Contact:

SBC3 PhidgetHelperFunctions Python module?

Post by dannereau »

Ok, more than a little frustrated here...

Finally got my SBC3 up and running with Phidget22 and the python Stepper.py example that works as expected.

Continuing on to get the 4x Digital Input phidget working...
Running the simple sample code immediately returns:
ImportError: No module named PhidgetHelperFunctions

And what's more... when I search the forums or docs for help I get zero results, and the forum search response even calls my query "phidgethelperfunctions" (either one word or three) "too common"...
For a module that is clearly in the example code, how can this be?

The close-to-turn-key setups that Phidgets were supposed to provide don’t seem to be very turn-key.

Help?
User avatar
mparadis
Site Admin
Posts: 959
Joined: Fri Oct 28, 2011 12:17 pm
Contact:

Re: SBC3 PhidgetHelperFunctions Python module?

Post by mparadis »

Is the file "PhidgetHelperFunctions.py" (which should be included in the example code zip file) in the same directory as DigitalInput.py when you try to compile DigitalInput.py?

The reason there are no search results is because this file is a very recent addition to our python examples.
dannereau
Fresh meat
Posts: 3
Joined: Thu May 03, 2018 9:57 pm
Contact:

Re: SBC3 PhidgetHelperFunctions Python module?

Post by dannereau »

No, it is not in the directory, and I don't understand how I would know it should be in the first place.

Also, I see nowhere on the site that offers a python sample code .zip file.
The only samples I can find are the ones at :

https://www.phidgets.com/?view=code_samples&lang=Python

which I have been downloading a la carte as needed.

Please enlighten me.
User avatar
mparadis
Site Admin
Posts: 959
Joined: Fri Oct 28, 2011 12:17 pm
Contact:

Re: SBC3 PhidgetHelperFunctions Python module?

Post by mparadis »

When you download the DigitalInput example from the page you just linked, it should be a zip file that contains the PhidgetHelperFunctions file.

Here's a direct link to the file: https://www.phidgets.com/downloads/phid ... hon_Ex.zip
dannereau
Fresh meat
Posts: 3
Joined: Thu May 03, 2018 9:57 pm
Contact:

Re: SBC3 PhidgetHelperFunctions Python module?

Post by dannereau »

Ok, so I realized my Mac was unziping the .zip file automatically... so it looked like a direct single .py file in my downloads directory.
I guess before May 8, all of the samples were single files.

I went back into my trash and found that the .zip file did indeed only have a single file, DigitalInput.py, which did also have the import reference in the code to PhidgetHelperFunctions.

I did some sleuthing and found that .zip version here (20180508):

https://www.phidgets.com/downloads/phid ... Python_Ex/

I see that it was updated a day after so I guess I downloaded it at just the wrong moment after the sample code had been updated but before the PhidgetHelperFunctions.py was added.

Anyway, thanks for clarifying.
User avatar
Patrick
Lead Developer
Posts: 3399
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: SBC3 PhidgetHelperFunctions Python module?

Post by Patrick »

Yes, these were mistakenly released with a missing file. Sorry about the confusion!

-Patrick
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests