You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
File "./rubiks.py", line 47, in init
self.buttons = Button()
File "build/bdist.linux-armv5tejl/egg/ev3dev/core.py", line 2118, in init
File "build/bdist.linux-armv5tejl/egg/ev3dev/core.py", line 2122, in _button_file
OK, I'll look at adding a Button() unit test set (I need to do this anyways, and figure out what's going on. I think that somewhere around 2118 and 2112 is where to start looking :-)
Most likely the issue is the way the Button instance is instatiated - and as I recall that part of the binding is hand-generated.
Hmmm, I thought I had removed all the uses of _file_cache - either I did not or I clobbered a merge somewhere. Either way, a test suite for Buttons() is next in line to get done, and then fixing the code should allow the tests to pass,
Unit test case created and failing (good) - code fix should arrive tomorrow ... I certainly removed the first instance of the _file_cache but did not complete the task
Thanks for checking to see if this is an existing issue :-) If you are comfortable with the command line and you are using Python2, you can replace the file at /usr/lib/python2.7/dist-packages/ev3dev/ev3.py with the one from the current https://github.com/rhempel/ev3dev-lang-python/tree/develop branch. If you're using Python3 - it's more complicated and you have to fix a .egg file.
I am working on fixing a few things in the Python API (still) and plan to release something soon (can't be more specific than that - sorry)
I think so - or you can do what I did which is rename the egg file to some other extension and link the Python 3 library folder to the Python 2 library
But I was not sure how comfortable you were doing any of this :-)
Activity
dwalton76 commentedon May 21, 2016
@rhempel if you can point me in the right direction on how this should work I can look at this one
rhempel commentedon May 22, 2016
Is this using the latest (untagged) version of the binding in the
developbranch?dwalton76 commentedon May 22, 2016
yes
rhempel commentedon May 22, 2016
OK, I'll look at adding a
Button()unit test set (I need to do this anyways, and figure out what's going on. I think that somewhere around 2118 and 2112 is where to start looking :-)Most likely the issue is the way the Button instance is instatiated - and as I recall that part of the binding is hand-generated.
ddemidov commentedon May 22, 2016
Looks like the problem was introduced in #162. The
Buttonclass is derived fromDeviceand uses_file_cachewhich was removed in #162.rhempel commentedon May 22, 2016
Hmmm, I thought I had removed all the uses of _file_cache - either I did not or I clobbered a merge somewhere. Either way, a test suite for Buttons() is next in line to get done, and then fixing the code should allow the tests to pass,
rhempel commentedon May 25, 2016
Unit test case created and failing (good) - code fix should arrive tomorrow ... I certainly removed the first instance of the _file_cache but did not complete the task
rhempel commentedon May 27, 2016
I finally got this done - the current https://github.com/rhempel/ev3dev-lang-python/tree/develop branch has the most up to date code - feel free to test and provide feedback
Kurtoid commentedon Jun 7, 2016
Newbie here: how can I apply the fix to my brick?
rhempel commentedon Jun 7, 2016
Thanks for checking to see if this is an existing issue :-) If you are comfortable with the command line and you are using Python2, you can replace the file at
/usr/lib/python2.7/dist-packages/ev3dev/ev3.pywith the one from the current https://github.com/rhempel/ev3dev-lang-python/tree/develop branch. If you're using Python3 - it's more complicated and you have to fix a.eggfile.I am working on fixing a few things in the Python API (still) and plan to release something soon (can't be more specific than that - sorry)
Kurtoid commentedon Jun 8, 2016
If egg files are a zip file, can i just unzip it, change the code and zip it again? (python3)
Thanks
rhempel commentedon Jun 8, 2016
I think so - or you can do what I did which is rename the egg file to some other extension and link the Python 3 library folder to the Python 2 library
But I was not sure how comfortable you were doing any of this :-)
Kurtoid commentedon Jun 8, 2016
Thanks! I deleted the python 3 egg file, and copied the python 2 version to 3, and then patched the file.
dwalton76 commentedon Jun 8, 2016
sudo python setup.py install
Is worth a try