Closed Petross404 closed 3 years ago
Hmm, mysterious. What do you get when you run the script here? https://github.com/adafruit/Adafruit_Python_PlatformDetect/blob/master/bin/detect.py
Could you please try again with the latest version of PlatformDetect? I added some caching, so I'm hoping that may have fixed it.
Could you please try again with the latest version of PlatformDetect? I added some caching, so I'm hoping that may have fixed it.
I will as soon as my shifts at work aren't changed constantly :) Thank you for the interest.
I also experienced this issue running v2.17.0 on Ubuntu 20.04 inside a VBox VM. Works fine on RPi3B and Orange Pi Zero LTS I have though.
The problem is the overriden __getattr__
in chip.Chip
. I'm making a PR to fix it.
It looks like this issue is still ongoing. I'm using a Google Coral dev board with balena OS and running a py file with import board
gives me this:
File "/app/hardware-logic/api.py", line 34, in <module>
import board
File "/usr/local/lib/python3.9/dist-packages/board.py", line 22, in <module>
from adafruit_blinka.agnostic import board_id, detector
File "/usr/local/lib/python3.9/dist-packages/adafruit_blinka/agnostic/__init__.py", line 21, in <module>
chip_id = detector.chip.id
File "/usr/local/lib/python3.9/dist-packages/adafruit_platformdetect/chip.py", line 419, in __getattr__
if self.id == attr:
File "/usr/local/lib/python3.9/dist-packages/adafruit_platformdetect/chip.py", line 419, in __getattr__
if self.id == attr:
File "/usr/local/lib/python3.9/dist-packages/adafruit_platformdetect/chip.py", line 419, in __getattr__
if self.id == attr:
[Previous line repeated 974 more times]
File "/usr/local/lib/python3.9/dist-packages/adafruit_platformdetect/chip.py", line 158, in id
self._chip_id = self._linux_id()
File "/usr/local/lib/python3.9/dist-packages/adafruit_platformdetect/chip.py", line 293, in _linux_id
hardware = self.detector.get_cpuinfo_field("Hardware")
File "/usr/local/lib/python3.9/dist-packages/adafruit_platformdetect/__init__.py", line 44, in get_cpuinfo_field
cpuinfo = infile.read().split("\n") RecursionError: maximum recursion depth exceeded while calling a Python object
I'm using these dependencies
pandas==1.4.1
ipython==8.4.0
smbus2==0.4.2
python-periphery==2.4.1
adafruit-blinka==8.19.0
adafruit-circuitpython-vl53l0x==3.6.9
I'm not sure if this is a balena issue I'm still encountering this. Any insight on a fix?
Apparently, this infinite loop happens when no chip or board can be detected. Balena deletes data from /proc/cpuinfo and thus the infinite loop. There should be a better way to handle this instead of getting this recursion error but for anyone that has this issue, you might need to fork the repo and manually set the chip and board ids manually.
@jczacharia can you provide the output of cat /proc/cpuinfo
for your board
@CrazyIvan359
processor : 0
BogoMIPS : 16.66
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part : 0xd03
CPU revision : 4
processor : 1
BogoMIPS : 16.66
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part : 0xd03
CPU revision : 4
processor : 2
BogoMIPS : 16.66
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part : 0xd03
CPU revision : 4
processor : 3
BogoMIPS : 16.66
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part : 0xd03
CPU revision : 4
I'm using a Google Coral and the chip and board should be set to:
chip_id = "IMX8MX"
board_id = "CORAL_EDGE_TPU_DEV"
Note I took a look at your fix #104 and that worked (as in no more infinite recursion) but it failed to recognize the chip and board and threw an appropriate error saying such.
Yeah they really strip a lot of info out of that. What about cat /proc/device-tree/compatible
fsl,imx8mq-phanbellfsl,imx8mq
With no line break at eof
Ok this is a different issue but it ends up giving the same symptoms because PlatformDetect cannot identify your board. Please open a new a new issue and reference one of your posts in this issue (click the 3 dots on your post, there is an option to Reference in new issue
).
Since I've come this far I'm working on a little PR to get this board to be detected. You'll see my PR tagged in your new issue when I push it.
Hello friends, I am using the FT232H and I am following the example that is shown here but when I am trying to
import board
I get the following error:I don't know if it's related with this error:
But anyway, this works:
I followed the steps with udev rules and reloading, I re-connected the FT232H but nothing. Important note: I installed Blinka, Platform-Detect, pyftdi and the rest with Portage on Gentoo Linux and not with
pip3
.Also
pyusb
is installed along withpyftdi
and the following packages:Any ideas what I could be missing here? Thank you in advance.