Skip to content
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

unable to ufs get a 20k file #12

Open
rhubarbdog opened this issue Dec 6, 2018 · 8 comments
Open

unable to ufs get a 20k file #12

rhubarbdog opened this issue Dec 6, 2018 · 8 comments

Comments

@rhubarbdog
Copy link

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

@bobpappas
Copy link

bobpappas commented Jan 27, 2022

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.

@carlosperate
Copy link
Contributor

@rhubarbdog @bobpappas would you be able to attach your files into this GitHub issue? I'd be interested to debug this.

@carlosperate
Copy link
Contributor

@rhubarbdog @bobpappas just a friendly ping in case you'd be able to provide the files that can easily replicate this issue. Thanks!

@rhubarbdog
Copy link
Author

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

@rhubarbdog
Copy link
Author

rhubarbdog commented May 22, 2022

i've done this to replicate the issue

  1. 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)`

@carlosperate
Copy link
Contributor

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. 👍

@andyclap
Copy link

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.

@BenDev9
Copy link

BenDev9 commented May 29, 2023

I also have had this problem, and I have opened #41 to try and fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants