Page 1 of 1
SBC3 PhidgetHelperFunctions Python module?
Posted: Wed May 09, 2018 2:01 pm
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?
Re: SBC3 PhidgetHelperFunctions Python module?
Posted: Wed May 09, 2018 2:18 pm
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.
Re: SBC3 PhidgetHelperFunctions Python module?
Posted: Wed May 09, 2018 7:27 pm
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.
Re: SBC3 PhidgetHelperFunctions Python module?
Posted: Thu May 10, 2018 7:48 am
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
Re: SBC3 PhidgetHelperFunctions Python module?
Posted: Thu May 10, 2018 11:45 am
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.
Re: SBC3 PhidgetHelperFunctions Python module?
Posted: Fri May 11, 2018 1:10 pm
by Patrick
Yes, these were mistakenly released with a missing file. Sorry about the confusion!
-Patrick