-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Erroneous exceptions and variable corruption #147
Comments
This function called from a second function
causes this error
line 51 is I've discovered the bug in my Two weeks client server game it was programmer-error please ignore the last 3 lines of my previous comment |
I'm looking like a bit of an idiot here as ignore my previous post. I still stand by my initial post, as here is another weird one
the line of code is
|
I didn't spot it either, but this error message has a clue! compass == microbit.compass. |
As Martin mentions (thanks!), the problem is the clashing of the And then creating the So
|
Yeah thanks for the bug fix. Now I've demonstrated how easy it is to look like an idiot, perhaps that error about The issue with the other two messages which I think i've forced out of micropython will be so hard to reproduce because it is very asynchronous sending radio packets of button presses and receiving a new screen back. Except for @dpgeorge seeing that when micropyton has many modules imported (math, radio, random, music and some of microbit) on a really small system there may be a bit of error corruption and weird crashes that pressing reset may solve but a re-flash always does work, so their may be some corruption on packets that microFS is transferring but the checksum is also damaged, but because it can be like that the checksum of the new data is equal to the corrupted checksum. |
I didn't quite understand this one? Is the issue transferring files via microFS when the micro:bit is running a Python programme with many imports? |
The internal MicroPython VM and runtime are very robust, there should not be any corruption or errors no matter how many modules are imported. In the worst case it will just give a
This is an interesting error... can you give more context and describe in more detail how it comes about? Did you press ctrl-C to stop the running program? |
i have written a multi-player client server game called Two Weeks it's a clone of fortnight. The repositorty is https://github.com/rhubarbdog/microbit-two-weeks
sometimes micropython crashes throwing an exception which cannot be true, one is
TypeError: exceptions must derive from BaseException
but the line of code isdisplay.show(Image.SAD_FACE)
another reads something like
ValueError: 'int' object can not be indexed
but in the line of code refers to a tuple.when i run a multi player version of Two Weeks the client and server assume each other's id, i'm yet to see the bug it may be hardware.
Pressing up and down on the controller seemed to change the variable
player
in the clientThe text was updated successfully, but these errors were encountered: