adafruit / circuitpython

CircuitPython - a Python implementation for teaching coding with microcontrollers
https://circuitpython.org
Other
4.1k stars 1.22k forks source link

Web workflow deletes chunk of code.py on save #8503

Closed BlitzCityDIY closed 8 months ago

BlitzCityDIY commented 1 year ago

CircuitPython version

Adafruit CircuitPython 9.0.0-alpha.1-64-gf14ca95df4 on 2023-10-06; Adafruit MatrixPortal S3 with ESP32S3

Code/REPL

import os
import gc
import ssl
import time
import wifi
import socketpool
import adafruit_requests
import adafruit_display_text.label
import board
import terminalio
import displayio
import framebufferio
import rgbmatrix
import adafruit_json_stream as json_stream
import microcontroller
from adafruit_ticks import ticks_ms, ticks_add, ticks_diff
from adafruit_datetime import datetime, timedelta
from adafruit_io.adafruit_io import IO_HTTP
import neopixel
import vectorio

displayio.release_displays()

# font color for text on matrix
font_color = 0xFFFFFF
# your timezone UTC offset and timezone name
timezone_info = [-4, "EDT"]

month_name = ["Jan.", "Feb.", "Mar.", "Apr.", "May", "June", "July", "Aug.",
              "Sept.", "Oct.", "Nov.", "Dec."]
weekday = ["Mon.", "Tues.", "Wed.", "Thurs.", "Fri.", "Sat.", "Sun."]

# the name of the sports you want to follow
sport_name = ["football", "baseball", "hockey", "basketball"]
sport_league = ["nfl", "mlb", "usa.1", "nhl", "nba"]
# the team names you want to follow
# must match the order of sport/league arrays
# include full name and then abbreviation (usually city/region)
team0 = ["New England Patriots", "NE"]
team1 = ["Boston Red Sox", "BOS"]
team2 = ["New England Revolution", "NE"]
team3 = ["Boston Bruins", "BOS"]
team4 = ["Boston Celtics", "BOS"]
# how often the API should be fetched
fetch_timer = 300 # seconds
# how often the display should update
display_timer = 30 # seconds

pixel = neopixel.NeoPixel(board.NEOPIXEL, 1, brightness = 0.3, auto_write=True)

# matrix setup
base_width = 64
base_height = 32
chain_across = 2
tile_down = 2
DISPLAY_WIDTH = base_width * chain_across
DISPLAY_HEIGHT = base_height * tile_down
matrix = rgbmatrix.RGBMatrix(
    width=DISPLAY_WIDTH, height=DISPLAY_HEIGHT, bit_depth=3,
    rgb_pins=[
        board.MTX_R1,
        board.MTX_G1,
        board.MTX_B1,
        board.MTX_R2,
        board.MTX_G2,
        board.MTX_B2
    ],
    addr_pins=[
        board.MTX_ADDRA,
        board.MTX_ADDRB,
        board.MTX_ADDRC,
        board.MTX_ADDRD
    ],
    clock_pin=board.MTX_CLK,
    latch_pin=board.MTX_LAT,
    output_enable_pin=board.MTX_OE,
    tile=tile_down, serpentine=True,
    doublebuffer=False
)
display = framebufferio.FramebufferDisplay(matrix)

# connect to WIFI
wifi.radio.connect(os.getenv("CIRCUITPY_WIFI_SSID"), os.getenv("CIRCUITPY_WIFI_PASSWORD"))
print(f"Connected to {os.getenv('CIRCUITPY_WIFI_SSID')}")

# add API URLs
SPORT_URLS = []
for i in range(len(sport_name)):
    d = (
    f"https://site.api.espn.com/apis/site/v2/sports/{sport_name[i]}/{sport_league[i]}/scoreboard"
    )
    SPORT_URLS.append(d)

context = ssl.create_default_context()
pool = socketpool.SocketPool(wifi.radio)
requests = adafruit_requests.Session(pool, context)
io = IO_HTTP(aio_username, aio_key, requests)

liz_chess = io.get_feed("liz-chess")
liz_wins = 0
noe_chess = io.get_feed("noe-chess")
noe_wins = 0

# arrays for teams, logos and display groups
teams = []
logos = []
groups = []
# add team to array
teams.append(team0)
# grab logo bitmap name
logo0 = "/team0_logos/" + team0[1] + ".bmp"
# add logo to array
logos.append(logo0)
# create a display group
group0 = displayio.Group()
# add group to array
groups.append(group0)
# repeat:
teams.append(team1)
logo1 = "/team1_logos/" + team1[1] + ".bmp"
logos.append(logo1)
group1 = displayio.Group()
groups.append(group1)
teams.append(team2)
logo2 = "/team2_logos/" + team2[1] + ".bmp"
logos.append(logo2)
group2 = displayio.Group()
groups.append(group2)
teams.append(team3)
logo3 = "/team3_logos/" + team3[1] + ".bmp"
logos.append(logo3)
group3 = displayio.Group()
groups.append(group3)
weather_group = displayio.Group()
groups.append(weather_group)
chess_group = displayio.Group()
groups.append(chess_group)

icon = "/weather_icons/01d.bmp"
bitmap = displayio.OnDiskBitmap(icon)
grid = displayio.TileGrid(bitmap, pixel_shader=bitmap.pixel_shader, x = 2)
time_text = adafruit_display_text.label.Label(terminalio.FONT, color=font_color,
                                                  text="00:00 AM")
time_text.anchor_point = (0.5, 1.0)
time_text.anchored_position = (DISPLAY_WIDTH / 2, DISPLAY_HEIGHT)

temp_text = adafruit_display_text.label.Label(terminalio.FONT, color=0xFF0000,
                                                  text=" ",
                                                  x=55, y=5)
humid_text = adafruit_display_text.label.Label(terminalio.FONT, color=0x0000FF,
                                              text=" ",
                                              x=55, y=15)
press_text = adafruit_display_text.label.Label(terminalio.FONT, color=0x00FF00,
                                              text=" ",
                                              x=55, y=25)
condition_text = adafruit_display_text.label.Label(terminalio.FONT, color=font_color,
                                              text=" ",
                                              x=5, y=35)

liz_chess_text = adafruit_display_text.label.Label(terminalio.FONT, color=font_color,
                                              text=" ",
                                              x=5, y=35)
noe_chess_text = adafruit_display_text.label.Label(terminalio.FONT, color=font_color,
                                              text=" ",
                                              x=35, y=35)
palette = displayio.Palette(1)
palette[0] = 0x550000
for i in range(128/8):
    for z in range(32/8):
        print(i)
        print(z)
        r = vectorio.Rectangle(pixel_shader=palette, width=8, height=8, x=0+i*8, y=0+z*8)
        chess_group.append(r)
try:
    weather_group[0] = grid
    weather_group[1] = temp_text
    weather_group[2] = humid_text
    weather_group[3] = press_text
    weather_group[4] = condition_text
    weather_group[5] = time_text
except IndexError:
    weather_group.append(grid)
    weather_group.append(temp_text)
    weather_group.append(humid_text)
    weather_group.append(press_text)
    weather_group.append(condition_text)
    weather_group.append(time_text)

chess_group.append(liz_chess_text)
chess_group.append(noe_chess_text)
display.root_group = chess_group

chess_clock = ticks_ms()
chess_timer = 10 * 1000

while True:
    if ticks_diff(ticks_ms(), chess_clock) >= chess_timer:
        if liz_wins != len(io.receive_all_data(chess_liz["key"])):
            liz_wins = len(io.receive_all_data(chess_liz["key"]))
            liz_chess_text.text = str(liz_wins)
        if noe_wins != len(io.receive_all_data(chess_noe["key"])):
            noe_wins = len(io.receive_all_data(chess_noe["key"]))
            noe_chess_text.text = str(noe_wins)
        print(liz_wins, noe_wins)
        chess_clock = ticks_add(chess_clock, chess_timer)

Behavior

i'm doing some development on a project with web workflow. i was editing the palette[0] color to 0x110000 from 0x550000 and after saving, web workflow hung. i refreshed the page, reconnected to my board and i got this message in the REPL:

connected
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.

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:
Traceback (most recent call last):
  File "code.py", line 38
SyntaxError: invalid syntax

Code done running.

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

reopening the code.py file, line 38 now showed this:

sport_name = ["football", "baseball", "hockey", "basketba��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������ins = 0

deleting up to line 108.

This happened twice, but the first time it only deleted up to line 102. However, it did insert the mystery characters in the sport_name array in the same spot. unfortunately i didn't have the chrome console open to see any possible error logs

Description

No response

Additional information

No response

BlitzCityDIY commented 1 year ago

i was able to have it happen again with the chrome console open:

Connected!
3index.js:37 write
index.js:37 Initializing File Transfer Client...
index.js:37 Waiting for connection status to change...
index.js:37     PUT http://cpy-2048dc.local/fs/code.py net::ERR_CONNECTION_RESET
_fetch @ index.js:37
writeFile @ index.js:37
await in writeFile (async)
writeFile @ index.js:24
writeFile @ index.js:35
op @ index.js:37
saveFile @ index.js:35
Gd @ index.js:37
await in Gd (async)
u @ index.js:9
Du @ index.js:9
keydown @ index.js:9
runCustomHandlers @ index.js:8
t @ index.js:8
(anonymous) @ index.js:8
index.js:37 write failed ProtocolError: Host 'cpy-2048dc.local' not found.
    at mc._fetch (index.js:37:2577)
    at async mc.writeFile (index.js:37:1942)
    at async xS.writeFile (index.js:24:4482)
    at async KS.showBusy (index.js:35:106428)
    at async KS.writeFile (index.js:35:108288)
    at async KS.op [as _saveFileContents] (index.js:37:14800)
    at async KS.saveFile (index.js:35:107513)
    at async Gd (index.js:37:11447) ProtocolError: Host 'cpy-2048dc.local' not found.
    at mc._fetch (https://code.circuitpython.org/assets/js/index.js:37:2577)
    at async mc.writeFile (https://code.circuitpython.org/assets/js/index.js:37:1942)
    at async xS.writeFile (https://code.circuitpython.org/assets/js/index.js:24:4482)
    at async KS.showBusy (https://code.circuitpython.org/assets/js/index.js:35:106428)
    at async KS.writeFile (https://code.circuitpython.org/assets/js/index.js:35:108288)
    at async KS.op [as _saveFileContents] (https://code.circuitpython.org/assets/js/index.js:37:14800)
    at async KS.saveFile (https://code.circuitpython.org/assets/js/index.js:35:107513)
    at async Gd (https://code.circuitpython.org/assets/js/index.js:37:11447)
index.js:37 write
index.js:37 write failed Error: Unable to perform file operation. Not Connected.
    at mc._checkConnection (index.js:37:1156)
    at mc.writeFile (index.js:37:1783)
    at xS.writeFile (index.js:24:4493)
    at KS.writeFile (index.js:35:108324)
    at op (index.js:37:14809) Error: Unable to perform file operation. Not Connected.
    at mc._checkConnection (https://code.circuitpython.org/assets/js/index.js:37:1156)
    at mc.writeFile (https://code.circuitpython.org/assets/js/index.js:37:1783)
    at xS.writeFile (https://code.circuitpython.org/assets/js/index.js:24:4493)
    at KS.writeFile (https://code.circuitpython.org/assets/js/index.js:35:108324)
    at op (https://code.circuitpython.org/assets/js/index.js:37:14809)

i had a few successful saves before this and was editing a different part of the code. it hung, i got that print out in the chrome console continuously, i refreshed the browser, reconnected to the board, opened the REPL, had this message:

connected
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.

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:
Traceback (most recent call last):
  File "code.py", line 165
SyntaxError: invalid syntax

Code done running.

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

opened code.py and this was now line 165:

condition_text = adafruit_display_text.label.Label(terminalio.FONT, color=font_color,
                                              text=" ",
                                              x=5, y=35��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������er, x = 0)
tannewt commented 1 year ago

Do you know if the ESP board restarted?

BlitzCityDIY commented 1 year ago

i'm not sure. i can try a newer build and see if the issue persists.

tannewt commented 1 year ago

I assume it does. I may need to get you setup with separate UART debug logging for more details.

dhalbert commented 11 months ago

Let's retest after 9.0.0-alpha.6, which has significant web workflow changes.

BlitzCityDIY commented 10 months ago

just had this occur again with alpha.6 twice. the second time i had the chrome terminal open so i have some info to include that is hopefully helpful. i was having only color bars show up on the matrix displays with the code running after reloading the code after the first occurrence. i clicked save + run in the web workflow gui without editing the code to try and kick the displays (this has worked previously). this caused it to hang. this was the output in the chrome terminal:

Load different workflow
index.js:37 Initializing File Transfer Client...
index.js:37 Waiting for connection status to change...
index.js:35 Connected!
index.js:35 Path: /code.py
index.js:37 Current File Changed to: /code.py
index.js:37 write
2index.js:37 write
index.js:37 

       PUT http://cpy-2048dc.local/fs/code.py net::ERR_CONNECTION_RESET
_fetch @ index.js:37
writeFile @ index.js:37
await in writeFile (async)
writeFile @ index.js:24
writeFile @ index.js:35
ap @ index.js:37
saveFile @ index.js:35
Jd @ index.js:37
await in Jd (async)
(anonymous) @ index.js:37
index.js:37 write failed ProtocolError: Host 'cpy-2048dc.local' not found.
    at gc._fetch (index.js:37:2577)
    at async gc.writeFile (index.js:37:1942)
    at async CS.writeFile (index.js:24:4482)
    at async JS.showBusy (index.js:35:106428)
    at async JS.writeFile (index.js:35:108288)
    at async JS.ap [as _saveFileContents] (index.js:37:14800)
    at async JS.saveFile (index.js:35:107513)
    at async Jd (index.js:37:11566)
    at async HTMLButtonElement.<anonymous> (index.js:37:11117) ProtocolError: Host 'cpy-2048dc.local' not found.
    at gc._fetch (https://code.circuitpython.org/assets/js/index.js:37:2577)
    at async gc.writeFile (https://code.circuitpython.org/assets/js/index.js:37:1942)
    at async CS.writeFile (https://code.circuitpython.org/assets/js/index.js:24:4482)
    at async JS.showBusy (https://code.circuitpython.org/assets/js/index.js:35:106428)
    at async JS.writeFile (https://code.circuitpython.org/assets/js/index.js:35:108288)
    at async JS.ap [as _saveFileContents] (https://code.circuitpython.org/assets/js/index.js:37:14800)
    at async JS.saveFile (https://code.circuitpython.org/assets/js/index.js:35:107513)
    at async Jd (https://code.circuitpython.org/assets/js/index.js:37:11566)
    at async HTMLButtonElement.<anonymous> (https://code.circuitpython.org/assets/js/index.js:37:11117)
index.js:37 Initializing File Transfer Client...
index.js:37 Waiting for connection status to change...
index.js:35 Connected!
index.js:37 write
index.js:37 

       PUT http://cpy-2048dc.local/fsundefined net::ERR_CONNECTION_RESET
_fetch @ index.js:37
writeFile @ index.js:37
await in writeFile (async)
writeFile @ index.js:24
writeFile @ index.js:35
ap @ index.js:37
setTimeout (async)
ap @ index.js:37
await in ap (async)
saveFile @ index.js:35
Jd @ index.js:37
await in Jd (async)
(anonymous) @ index.js:37
index.js:37 write failed ProtocolError: Host 'cpy-2048dc.local' not found.
    at gc._fetch (index.js:37:2577)
    at async gc.writeFile (index.js:37:1942)
    at async CS.writeFile (index.js:24:4482)
    at async JS.showBusy (index.js:35:106428)
    at async JS.writeFile (index.js:35:108288)
    at async ap (index.js:37:14800) ProtocolError: Host 'cpy-2048dc.local' not found.
    at gc._fetch (https://code.circuitpython.org/assets/js/index.js:37:2577)
    at async gc.writeFile (https://code.circuitpython.org/assets/js/index.js:37:1942)
    at async CS.writeFile (https://code.circuitpython.org/assets/js/index.js:24:4482)
    at async JS.showBusy (https://code.circuitpython.org/assets/js/index.js:35:106428)
    at async JS.writeFile (https://code.circuitpython.org/assets/js/index.js:35:108288)
    at async ap (https://code.circuitpython.org/assets/js/index.js:37:14800)
index.js:37 write
index.js:37 

       PUT http://cpy-2048dc.local/fsundefined net::ERR_CONNECTION_RESET
_fetch @ index.js:37
writeFile @ index.js:37
await in writeFile (async)
writeFile @ index.js:24
writeFile @ index.js:35
ap @ index.js:37
setTimeout (async)
ap @ index.js:37
setTimeout (async)
ap @ index.js:37
await in ap (async)
saveFile @ index.js:35
Jd @ index.js:37
await in Jd (async)
(anonymous) @ index.js:37
index.js:37 write failed ProtocolError: Host 'cpy-2048dc.local' not found.
    at gc._fetch (index.js:37:2577)
    at async gc.writeFile (index.js:37:1942)
    at async CS.writeFile (index.js:24:4482)
    at async JS.showBusy (index.js:35:106428)
    at async JS.writeFile (index.js:35:108288)
    at async ap (index.js:37:14800) ProtocolError: Host 'cpy-2048dc.local' not found.
    at gc._fetch (https://code.circuitpython.org/assets/js/index.js:37:2577)
    at async gc.writeFile (https://code.circuitpython.org/assets/js/index.js:37:1942)
    at async CS.writeFile (https://code.circuitpython.org/assets/js/index.js:24:4482)
    at async JS.showBusy (https://code.circuitpython.org/assets/js/index.js:35:106428)
    at async JS.writeFile (https://code.circuitpython.org/assets/js/index.js:35:108288)
    at async ap (https://code.circuitpython.org/assets/js/index.js:37:14800)
index.js:37 write
index.js:37 

       PUT http://cpy-2048dc.local/fsundefined 405 (Method Not Allowed)
_fetch @ index.js:37
writeFile @ index.js:37
await in writeFile (async)
writeFile @ index.js:24
writeFile @ index.js:35
ap @ index.js:37
setTimeout (async)
ap @ index.js:37
setTimeout (async)
ap @ index.js:37
setTimeout (async)
ap @ index.js:37
await in ap (async)
saveFile @ index.js:35
Jd @ index.js:37
await in Jd (async)
(anonymous) @ index.js:37
index.js:37 write failed ProtocolError: Method Not Allowed
    at gc._fetch (index.js:37:2637)
    at async gc.writeFile (index.js:37:1942)
    at async CS.writeFile (index.js:24:4482)
    at async JS.showBusy (index.js:35:106428)
    at async JS.writeFile (index.js:35:108288)
    at async ap (index.js:37:14800) ProtocolError: Method Not Allowed
    at gc._fetch (https://code.circuitpython.org/assets/js/index.js:37:2637)
    at async gc.writeFile (https://code.circuitpython.org/assets/js/index.js:37:1942)
    at async CS.writeFile (https://code.circuitpython.org/assets/js/index.js:24:4482)
    at async JS.showBusy (https://code.circuitpython.org/assets/js/index.js:35:106428)
    at async JS.writeFile (https://code.circuitpython.org/assets/js/index.js:35:108288)
    at async ap (https://code.circuitpython.org/assets/js/index.js:37:14800)
index.js:37 write
index.js:37 
 PUT http://cpy-2048dc.local/fsundefined 405 (Method Not Allowed)
_fetch @ index.js:37
writeFile @ index.js:37
await in writeFile (async)
writeFile @ index.js:24
writeFile @ index.js:35
ap @ index.js:37
setTimeout (async)
ap @ index.js:37
setTimeout (async)
ap @ index.js:37
setTimeout (async)
ap @ index.js:37
setTimeout (async)
ap @ index.js:37
setTimeout (async)
ap @ index.js:37
await in ap (async)
saveFile @ index.js:35
Jd @ index.js:37
await in Jd (async)
(anonymous) @ index.js:37
index.js:37 write failed ProtocolError: Method Not Allowed
    at gc._fetch (index.js:37:2637)
    at async gc.writeFile (index.js:37:1942)
    at async CS.writeFile (index.js:24:4482)
    at async JS.showBusy (index.js:35:106428)
    at async JS.writeFile (index.js:35:108288)
    at async ap (index.js:37:14800) ProtocolError: Method Not Allowed
    at gc._fetch (https://code.circuitpython.org/assets/js/index.js:37:2637)
    at async gc.writeFile (https://code.circuitpython.org/assets/js/index.js:37:1942)
    at async CS.writeFile (https://code.circuitpython.org/assets/js/index.js:24:4482)
    at async JS.showBusy (https://code.circuitpython.org/assets/js/index.js:35:106428)
    at async JS.writeFile (https://code.circuitpython.org/assets/js/index.js:35:108288)
    at async ap (https://code.circuitpython.org/assets/js/index.js:37:14800)
index.js:37 write
index.js:37 

       PUT http://cpy-2048dc.local/fsundefined 405 (Method Not Allowed)
_fetch @ index.js:37
writeFile @ index.js:37
await in writeFile (async)
writeFile @ index.js:24
writeFile @ index.js:35
ap @ index.js:37
setTimeout (async)
ap @ index.js:37
setTimeout (async)
ap @ index.js:37
setTimeout (async)
ap @ index.js:37
setTimeout (async)
ap @ index.js:37
setTimeout (async)
ap @ index.js:37
setTimeout (async)
ap @ index.js:37
await in ap (async)
saveFile @ index.js:35
Jd @ index.js:37
await in Jd (async)
(anonymous) @ index.js:37
index.js:37 write failed ProtocolError: Method Not Allowed
    at gc._fetch (index.js:37:2637)
    at async gc.writeFile (index.js:37:1942)
    at async CS.writeFile (index.js:24:4482)
    at async JS.showBusy (index.js:35:106428)
    at async JS.writeFile (index.js:35:108288)
    at async ap (index.js:37:14800) ProtocolError: Method Not Allowed
    at gc._fetch (https://code.circuitpython.org/assets/js/index.js:37:2637)
    at async gc.writeFile (https://code.circuitpython.org/assets/js/index.js:37:1942)
    at async CS.writeFile (https://code.circuitpython.org/assets/js/index.js:24:4482)
    at async JS.showBusy (https://code.circuitpython.org/assets/js/index.js:35:106428)
    at async JS.writeFile (https://code.circuitpython.org/assets/js/index.js:35:108288)
    at async ap (https://code.circuitpython.org/assets/js/index.js:37:14800)
index.js:37 write
index.js:37 

while this was repeating in the chrome terminal, blinka was spinning on the workflow window and i could see that the neopixel on the board was blinking yellow. i refreshed chrome and the workflow connected properly:

Load different workflow
index.js:37 Initializing File Transfer Client...
index.js:37 Waiting for connection status to change...
index.js:35 Connected!
index.js:35 Path: /code.py
index.js:37 Current File Changed to: /code.py

after opening code.py i saw that the first 148 lines of code had been deleted and replaced with the garbage characters like before.

tannewt commented 8 months ago

@BlitzCityDIY Have you had a chance to use web workflow recently? Is this still an issue?

BlitzCityDIY commented 8 months ago

i tried again tonight. i erased the flash and installed 9.0beta 2. it has not been erasing chunks of code but it has been going into safe mode inconsistently (not a very helpful data point). it's happened 2/5 times on saving and then randomly while running the code. i'll be connected to the serial monitor on web workflow and it stops, doesn't show disconnect and i see the neopixel flashing yellow 3x. might be time for the debug build?

BlitzCityDIY commented 8 months ago

actually the safe mode issue seems to be separate from web workflow. i power cycled and didn't try to get back into it and it went into safe mode on its own after a while. i'll try to get more info tomorrow

BlitzCityDIY commented 8 months ago

i think this is good to close. i've been using absolute newest and adding/deleting chunks of code and the issue has not popped up where previously it would have during that kind of use. thank you! looking forward to using it more 🙂

tannewt commented 8 months ago

i think this is good to close. i've been using absolute newest and adding/deleting chunks of code and the issue has not popped up where previously it would have during that kind of use. thank you! looking forward to using it more 🙂

Great! Thanks for the update.