Skip to content

import adafruit_circuitplayground.express from an imported file fails #2437

@dmopalmer

Description

@dmopalmer

With a file testme.py which consists of the single import statement:

import adafruit_circuitplayground.express

I get a maximum recursion depth error:

Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 5.0.0-beta.0 on 2019-11-19; Adafruit CircuitPlayground Express with samd21g18
>>> import testme
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "testme.py", line 1, in <module>
  File "adafruit_circuitplayground/express.py", line 699, in <module>
  File "adafruit_circuitplayground/express.py", line 127, in __init__
  File "adafruit_lis3dh.py", line 321, in __init__
  File "adafruit_lis3dh.py", line 100, in __init__
  File "adafruit_lis3dh.py", line 126, in data_rate
  File "adafruit_lis3dh.py", line 300, in _read_register_byte
  File "adafruit_lis3dh.py", line 325, in _read_register
RuntimeError: maximum recursion depth exceeded
>>> 

I get this on the latest version 4.1.2 and version 5.0.0-beta.2 as well, although those don't dump the stack trace, but crash and then complain on the next reboot that the stack was corrupted.

This is with the lib directory empty.

Doing the same import adafruit_circuitplayground.express from the command line has no problems.
Doing that import from the command line and then import testme also works fine.

I tried this on two different Circuit Playground Express hardware units.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy