Maximum recursion depth?
-
I am getting:
File "flowlib/hw/mpu6050.py", line 145, in acceleration RuntimeError: maximum recursion depth exceeded
I'm using the timer and button events, and that may contribute, but how do I debug this? What is the maximum recursion depth, and can I display the current depth?
-
Sometimes I get a stack dump almost immediately on starting the network, so maybe I'm skating close to the edge.
Connected. Network config: ('192.168.6.109', '255.255.255.0', '192.168.6.1', '192.168.6.1') ***ERROR*** A stack overflow in task mp_thread has been detected. abort() was called at PC 0x400899a8 on core 1 ELF file SHA256: 0000000000000000000000000000000000000000000000000000000000000000 Backtrace: 0x400896a7:0x3ffb9160 0x40089991:0x3ffb9180 0x400899a8:0x3ffb91a0 0x4009220a:0x3ffb91c0 0x40093f98:0x3ffb91e0 0x40093f4e:0x3ffb91cc
-
could you provide your code?
-
This post is deleted! -
I decided to go to a polling loop instead and it seems to work a lot better.
-
@dclaar
See https://www.geeksforgeeks.org/python-handling-recursion-limit/ :
by default, the value normally is 10^4. -
As I'm not doing recursion explicitly, there must be something going on behind the scenes. Or I've got an error! Or maybe event-driven isn't clean and somehow keeps calling itself.
-
Since I'm not expressly using recursion, something else must be happening. Or I made a mistake! Or perhaps event-driven isn't clean and keeps naming itself in some way[url=https://mybankinginformation.com/citibank-routing-number/].[/url]
-
Instead, I choose to switch to a polling loop, and it seems to function much better.
-
Instead, I switched to a polling loop, which seemed to work much better.
-
Rather, I chose to switch to polling, which worked much better, so it seems.