Page 1 of 1

Interface-simple.py problem

Posted: Sun Nov 20, 2016 2:51 pm
by dakotaranch
Hello, Don't know anything about Python but going to start learning it's use with Phidgets. I installed fresh Ubuntu install, Python Modules and Examples and started out by running Helloworld.py and works fine (after fixing raw_input problem). Then tried Interface-simple.py and get the following:

$ python3 InterfaceKit-simple.py
Traceback (most recent call last):
File "InterfaceKit-simple.py", line 77, in <module>
interfaceKit.setOnInputChangeHandler(interfaceKitInputChanged)
File "/usr/local/lib/python3.5/dist-packages/Phidgets/Devices/InterfaceKit.py", line 147, in setOnInputChangeHandler
self.__onInputChange = self.__INPUTCHANGEHANDLER(self.__nativeInputChangeEvent)
AttributeError: 'InterfaceKit' object has no attribute '_InterfaceKit__INPUTCHANGEHANDLER'

I'm running the pretty recent Ubuntu and Python:

/prog/examples/python_examples/Python$ python3
Python 3.5.2 (default, Jul 5 2016, 12:43:10)
[GCC 5.4.0 20160609] on linux

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.1 LTS
Release: 16.04
Codename: xenial

Sample version:
__author__ = 'Adam Stelmack'
__version__ = '2.1.8'
__date__ = 'May 17 2010'

I did modify these two files by changing the linux2 to linux so I could get the sample to run on my platform:
/usr/local/lib/python3.5/dist-packages/Phidgets/Manager.py
/usr/local/lib/python3.5/dist-packages/Phidgets/PhidgetLibrary.py


I compiled and ran the Interface-simple.c example and it works fine so the 8/8/8 Interface is functioning. This doesn't keep me from moving forward with learning python with Phidgets but if the sample doesn't even work I'm thinking I will run into problems down the road if I don't know what is causing this.

Oh. I also built up a laptop with the same software and get the same results. hummm.

Thanks for any assistance.