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

What version of Python to use with this script? #3

Open
krokodylowy opened this issue Jan 23, 2017 · 4 comments
Open

What version of Python to use with this script? #3

krokodylowy opened this issue Jan 23, 2017 · 4 comments

Comments

@krokodylowy
Copy link

krokodylowy commented Jan 23, 2017

Current version of Python 3.6.0 for Windows fails with error

d:\temp>python uboot_mdb_to_image.py a.txt >a.bin
Traceback (most recent call last):
File "uboot_mdb_to_image.py", line 34, in
data, ascii_data = line.split(" ", maxsplit = 1)
ValueError: not enough values to unpack (expected 2, got 1)

OK. Everything is OK. Command used must be strict python uboot_mdb_to_image.py<a.txt>a.bin
Format of a.txt is the same as in readme.

@Theosakamg
Copy link

Same issue...
Python 3.5.3 for Debian Testing

python3 uboot_mdb_to_image.py < dump-TV-IP672PI.txt > dump.img
...
00f80000 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
Traceback (most recent call last):
File "uboot_mdb_to_image.py", line 34, in
data, ascii_data = line.split(" ", maxsplit = 1)
ValueError: not enough values to unpack (expected 2, got 1)

but result is good ! (when the script crash the rest of the content is a same "ff" to the end)

@gmbnomis
Copy link
Owner

gmbnomis commented Apr 3, 2017

The script is very picky about it's input (to flag transmission errors). For example, there must be no empty lines at all. Can you locate the position in the input file where it crashes and have a look whether there is something unusual?

@SciLor
Copy link

SciLor commented May 6, 2019

The problem is, when the last line of the script is not 16 bytes long, you will get that error.

@Feehley
Copy link

Feehley commented Jul 14, 2023

Patch your log file to include excess bytes. I'll try to remember to add an append to it if the line is too short and issue a patch request

Feehley added a commit to Feehley/uboot-mdb-dump that referenced this issue Jul 14, 2023
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