Black Lives Matter - Action and Equality. ... Adafruit is open and shipping.
0

Garbled exception on code.py reload and broken serial consol
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Garbled exception on code.py reload and broken serial consol

by kevinjwalters on Fri Jun 19, 2020 1:47 pm

I've seen this twice now, I very occasionally get garbled output for the errors that can occur with restarting a board from copying code.py to the CIRCUITPY. I've recently switched from drag and drop in windows explorer to powershell's copy but I think I've got one of these errors from both approaches. I'd be interested to know if anyone else gets this? This happens to be on 5.3.0.

Code: Select all | TOGGLE FULL SIZE
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
Traceback (most recent call last):
  File "code.py", line 1126
IndentationError", line 1126
IndentationErrorst):
 over USB to run them or ent



Press any key to enter the REPL. Use CTRL-D to reload.


I looked into the previous more cryptic one and found it was part of a string used by the CircuitPython interpreter in serial_write_compressed(). The board needs reseting after this to get its USB serial console working again.

I've just noticed the NeoPixel on the back of the CLUE is trying to tell me something, it's "saying": green, yellow, off, white, blue, blue, yellow, yellow, cyan x 6 or 7 times (difficult to count).

Powershell's copy does cause errors on a copy of this fairly large code.py file most of the time but it generally immediately recovers picking up all the change, e.g.

Code: Select all | TOGGLE FULL SIZE
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
Traceback (most recent call last):
  File "code.py", line 1241
IndentationError: unindent does not match any outer indentation level



Press any key to enter the REPL. Use CTRL-D to reload.soft reboot

Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
...first line of output from the application...

kevinjwalters
 
Posts: 634
Joined: Sun Oct 01, 2017 3:15 pm

Re: Garbled exception on code.py reload and broken serial co

by siddacious on Thu Jun 25, 2020 1:14 pm

Thanks for letting us know. I'll make sure the powers that be see this

siddacious
 
Posts: 271
Joined: Fri Apr 21, 2017 3:09 pm

Re: Garbled exception on code.py reload and broken serial co

by AnneBarela on Thu Jun 25, 2020 1:21 pm

Hi Kevin - this appears to be a strange one. Have you dug deeper into what may be causing this? If so, could it boiled down to a "minimum program example" that triggers the error? This will help the devs dive in and see if, indeed, this is the case. And this is for Clue, have you seen it on any other board?

Thanks, Anne

AnneBarela
 
Posts: 748
Joined: Sat Mar 24, 2012 8:56 pm
Location: Mid-Atlantic

Re: Garbled exception on code.py reload and broken serial co

by kevinjwalters on Thu Jun 25, 2020 1:26 pm

CPB and CLUE on 5.3.0. I posted this mainly to see if others had seen this. The occurrence rate is very low and I'd struggle to guess the factors involved in triggering it. It's possible that it relates to USB comms/drivers but it's not frequent enough to catch with wireshark unless I leave that running all the time!

kevinjwalters
 
Posts: 634
Joined: Sun Oct 01, 2017 3:15 pm

Please be positive and constructive with your questions and comments.