adafruit / adafruit/Adafruit_CircuitPython_ServoKit
Using Adafruit_CircuitPython_ServoKit in a container
- Dominant language
- Python
- Stars
- 78
- Forks
- 31
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
I have no issues installing and enabling and using Adafruit_CircuitPython_ServoKit locally (outside container) on Jetson Nano.
I run this simple code (and servos move):
from adafruit_servokit import ServoKit
_kit = ServoKit(channels=16)
pan = 90
tilt = 90
kit.servo[0].angle = pan
kit.servo[1].angle = tilt_
But when installing it inside container and running the same code, I get the next message:
_Traceback (most recent call last):
File "/home/marko/Desktop/pyProg/NVIDIA/servotest.py", line 1, in
from adafruit_servokit import ServoKit
File "/usr/local/lib/python3.6/dist-packages/adafruit_servokit.py", line 35, in
import board
File "/usr/local/lib/python3.6/dist-packages/board.py", line 33, in
from adafruit_blinka.agnostic import board_id, detector
File "/usr/local/lib/python3.6/dist-packages/adafruit_blinka/agnostic/__init__.py", line 18, in
chip_id = detector.chip.id
File "/usr/local/lib/python3.6/dist-packages/adafruit_platformdetect/chip.py", line 350, in __getattr__
if self.id == attr:
File "/usr/local/lib/python3.6/dist-packages/adafruit_platformdetect/chip.py", line 350, in __getattr__
if self.id == attr:
File "/usr/local/lib/python3.6/dist-packages/adafruit_platformdetect/chip.py", line 350, in __getattr__
if self.id == attr:
[Previous line repeated 320 more times]
File "/usr/local/lib/python3.6/dist-packages/adafruit_platformdetect/chip.py", line 154, in id
self._chip_id = self._linux_id()
File "/usr/local/lib/python3.6/dist-packages/adafruit_platformdetect/chip.py", line 235, in _linux_id
hardware = self.detector.get_cpuinfo_field("Hardware")
File "/usr/local/lib/python3.6/dist-packages/adafruit_platformdetect/__init__.py", line 49, in get_cpuinfo_field
with open("/proc/cpuinfo", "r") as infile:
File "/usr/lib/python3.6/codecs.py", line 309, in __init__
IncrementalDecoder.__init__(self, errors)
RecursionError: maximum recursion depth exceeded_
**What else am I missing in my container?**
"i2cdetect -y -r 1" shows me that PCF9685 controler is visible inside container.
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: 40 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the traceback through adafruit_servokit.py, board.py, adafruit_blinka.agnostic, and adafruit_platformdetect/chip.py, then compare the container's platform information with the working host environment. Reproduce the import failure while confirming the visible PCF9685 device, and document the container requirements or confirmed cause.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100