Comments (11)
Hmm, mysterious. What do you get when you run the script here? https://github.com/adafruit/Adafruit_Python_PlatformDetect/blob/master/bin/detect.py
from adafruit_python_platformdetect.
Could you please try again with the latest version of PlatformDetect? I added some caching, so I'm hoping that may have fixed it.
from adafruit_python_platformdetect.
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.
from adafruit_python_platformdetect.
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.
from adafruit_python_platformdetect.
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?
from adafruit_python_platformdetect.
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.
from adafruit_python_platformdetect.
@jczacharia can you provide the output of cat /proc/cpuinfo
for your board
from adafruit_python_platformdetect.
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.
from adafruit_python_platformdetect.
Yeah they really strip a lot of info out of that. What about cat /proc/device-tree/compatible
from adafruit_python_platformdetect.
fsl,imx8mq-phanbellfsl,imx8mq
With no line break at eof
from adafruit_python_platformdetect.
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.
from adafruit_python_platformdetect.
Related Issues (20)
- CM4001032 Not Recognized HOT 2
- Libre AML-S905X-CC (LePotato) HOT 6
- Raspberry pi 4B 8GB d03115 not detected HOT 1
- Add any_embedded_linux test to detect.py HOT 1
- Simplify Pi 4 (and possibly CM4) Rev Code Checks HOT 3
- Unable to install but it was working previously HOT 11
- Move from setup.py to pyproject.toml
- Build fails HOT 3
- Problem for Orange Pi zeros 2 detection on Debian HOT 11
- Problem with Detecting A new version of Raspberry pi 3B + HOT 5
- Build failures due to board.py exceeding maximum lines permitted by Pylint HOT 2
- Circuitpython - Generic datalogger code using platformdetect for sbc/embedded library switching HOT 2
- Recursion Error when recognizing on certain systems HOT 10
- Unsupported Board (d03115) HOT 4
- #331 breaks microcontroller package HOT 4
- OLIMEX_LIME2 Not Found HOT 1
- circuitpython-build-bundles causing CI failures HOT 3
- detector.chip.id raise AttributeError() # Avoid infinite recursion on RPI 3 B HOT 5
- Khadas vim3 not being detected on Linux Ubuntu 4.9 HOT 3
- orangepipc2 detection is wrong 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 adafruit_python_platformdetect.