microfs
microfs copied to clipboard
unable to `ufs get` a 20k file
I've created what i believe to be a 20k file.
when i type ufs get 20k.txt test.txt
it consistently says not enough values to unpack (expected 2, got 1)
when i type ufs ls
it lists the file 20k.txt
I get this same error when I try to ufs put
certain 4k file. Works on microbit 1.5, not 2.0.
I also have another 4k file that works on both.
@rhubarbdog @bobpappas would you be able to attach your files into this GitHub issue? I'd be interested to debug this.
@rhubarbdog @bobpappas just a friendly ping in case you'd be able to provide the files that can easily replicate this issue. Thanks!
I no longer have the laptop which had the microbit program which created the 20k file. I'll try a few things this week to see if I can replicate it
i've done this to replicate the issue
-
uflash
the microbit to a empty microbit
with open('bigfile.txt', 'w') as file_ :
for a in range(2560):
file_.write('microbit')```
transfer the above program and `main.py` using ufs put bigfile.py main.py`
run the program.
try `ufs ls` and the file `bigfile.txt` exists on the microbit
try to tranfer it to your laptop with `ufs get bigfile.txt` some data appears to come up the wire,
but `ufs` crashes with error message `not enough values to unpack (expected 2, got 1)`
Thanks a lot for the instructions @rhubarbdog! I'll away for a few days this week, but I'll try to find some time to do some debugging next week. 👍
Oldie, but I just had this problem. It seems the 1s timeout is not long enough for large files when it's doing the read_until.
I changed 119 in get_serial()
to
return Serial(port, SERIAL_BAUD_RATE, timeout=60, parity="N")
and it worked OK for my 10K file.
I also have had this problem, and I have opened #41 to try and fix this.