Replies: 1 comment 9 replies
-
|
The error is similar to this issue. In his case, it was a bad cable. Is it possible to rule that our for your setup, or could it be the same? |
Beta Was this translation helpful? Give feedback.
9 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
My Issue:
I encounter a problem with my code that often crashes when I try to move the motors. This issue occurs particularly when I am using a lot of memory and my coroutine has run for some time.
It doesn't always crash at the same place, but it is always OSError: [Errno 1] EPERM when moving a Motor.
I have not found a way to replicate it with a simpler program to isolate the problem, but any advice would be appreciated!
My Question:
Is this a bug in my code or maybe even in the firmware? What should be my next steps towards debugging this?
Example Traceback:
Memory Usage:
For contex:
I want to use a Lego Spike Prime robot to play Connect 4.
The Program is separated into multiple classes, one for controlling the hardware, one for calculating the next moves and one for coordinating the others. The Classes work on their own and the issue only arises when combined with the coordinating class, but I cant see what would be causing it.
I have attached all files and a class diagram(not 100% accurate) if you want to take a look at the complete Project.
pybricks-backup-2025-05-19_12-47-06.zip
Below are the main parts of the program I suspect cause the issue
The coordinating class is:
The Class that is responsible for controlling the Robot is:
Beta Was this translation helpful? Give feedback.
All reactions