Skip to content

detector.chip.id raise AttributeError() # Avoid infinite recursion on RPI 3 B #342

@Elwinmage

Description

@Elwinmage

Hi, I have an AttributeError() trying to detect my chip id (RPI 3B)

$ pip list |grep -i adafruit

Adafruit-PlatformDetect 3.60.0

python 3.11.8 (main, Feb 19 2024, 17:01:17) [GCC 13.2.1 20231014] on linux
Type "help", "copyright", "credits" or "license" for more information.

from adafruit_platformdetect import Detector
detector = Detector()
print("Chip id: ", detector.chip.id)
Traceback (most recent call last):
File "", line 1, in
File "/usr/lib/python3.11/site-packages/adafruit_platformdetect/chip.py", line 428, in getattr
raise AttributeError() # Avoid infinite recursion
^^^^^^^^^^^^^^^^^^^^^^
AttributeError

$ cat /etc/os-release

NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.19.1
PRETTY_NAME="Alpine Linux v3.19"
HOME_URL="https://alpinelinux.org/"
BUG_REPORT_URL="https://gitlab.alpinelinux.org/alpine/aports/-/issues"

$ cat /proc/cpuinfo

processor : 0
BogoMIPS : 38.40
Features : fp asimd evtstrm crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part : 0xd03
CPU revision : 4

processor : 1
BogoMIPS : 38.40
Features : fp asimd evtstrm crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part : 0xd03
CPU revision : 4

processor : 2
BogoMIPS : 38.40
Features : fp asimd evtstrm crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part : 0xd03
CPU revision : 4

processor : 3
BogoMIPS : 38.40
Features : fp asimd evtstrm crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part : 0xd03
CPU revision : 4

Revision : a22082
Serial : 000000008a496a07
Model : Raspberry Pi 3 Model B Rev 1.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions