Comments (5)
Code is wrong at time.sleep(ms/1000), is ms previously defined. Check for
that because sleep function takes int.
On Saturday, March 14, 2015, Ali Yousuf [email protected] wrote:
In a freshly installed Debian (2015-03-01) on Beaglebone Black Rev A6A,
the encoder_test.py example shows this error:Traceback (most recent call last):
File "encoder_test.py", line 24, in
run(setup, loop)
File "/usr/local/lib/python2.7/dist-packages/PyBBIO-0.9.3-py2.7-linux-armv7l.egg/bbio/bbio.py", line 60, in run
loop()
File "encoder_test.py", line 22, in loop
delay(1000)
File "/usr/local/lib/python2.7/dist-packages/PyBBIO-0.9.3-py2.7-linux-armv7l.egg/bbio/common.py", line 36, in delay
time.sleep(ms/1000.0)
TypeError: must be string, not int
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
func(_targs, *_kargs)
File "/usr/local/lib/python2.7/dist-packages/PyBBIO-0.9.3-py2.7-linux-armv7l.egg/bbio/bbio.py", line 21, in bbio_cleanup
for cleanup in ADDITIONAL_CLEANUP:
TypeError: must be string, not int
Error in sys.exitfunc:
Traceback (most recent call last):
File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
func(_targs, *_kargs)
File "/usr/local/lib/python2.7/dist-packages/PyBBIO-0.9.3-py2.7-linux-armv7l.egg/bbio/bbio.py", line 21, in bbio_cleanup
for cleanup in ADDITIONAL_CLEANUP:
TypeError: must be string, not intReply to this email directly or view it on GitHub
#58.
Saleem Ahmad
from pybbio.
I have not changed anything in the example. It is in integer already. The error says "must be String" -- I'm also confused at this.
Here is the code
#!/usr/bin/env python
"""
encoder_test.py
Rekha Seethamraju
An example to demonstrate the use of the eQEP library
for PyBBIO.
This example program is in the public domain.
"""
from bbio import *
from bbio.libraries.RotaryEncoder import RotaryEncoder
encoder = RotaryEncoder(RotaryEncoder.EQEP2b)
def setup():
encoder.setAbsolute()
encoder.zero()
def loop():
print "encoder position : \t"+encoder.getPosition()
delay(1000)
run(setup, loop)
from pybbio.
Hmm... this is an odd one. Seems that either the RotaryEncoder library itself or the sysfs C extension it uses to read/write the eQEP driver files is the source of the problem (time.sleep most certainly doesn't take a string!). I'm looking into it...
from pybbio.
Just letting you know I'm having the exact same problem with the same code
I'm on Beaglebone Black Rev C. Version is:
Linux beaglebone 3.8.13-bone70 #1 SMP Fri Jan 23 02:15:42 UTC 2015 armv7l GNU/Linux
Any new ideas on this yet? I'm stuck
from pybbio.
OK got it, I was missing a type check in a C extension, and the TypeError was popping up at a weird time.
from pybbio.
Related Issues (20)
- I2C Library
- Unable to use PWM1A and PWM1B at the same time HOT 2
- Analog In not recognized HOT 4
- pwmFrequency int division vs float division
- GPIO resource busy error
- SPI0.write crashes Beagleblone HOT 1
- SPI0.write crashes Beagleblone HOT 1
- Questions about Contributions HOT 1
- Pull-ups, pull-down configuration issue
- GPIO configuration bug HOT 2
- SystemError: NULL result without error in PyObject_Call when testing blink.py
- example blink.py error with beaglebone black HOT 2
- BBIOServer_test.py error HOT 4
- MAX31855_test.py problem HOT 4
- importing bbio causes immediate segfault HOT 8
- WebCam - no module named gst HOT 1
- GPIO does not work after "bbio.pinMode" HOT 3
- no module named WebCam HOT 9
- Problem running PyBBIO ADC code on BBB attached to 4D Systems 4DCAPE HOT 8
- not an issue but a doubt HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pybbio.