t0x0 / random

Random projects
MIT License
92 stars 47 forks source link

ff2img - python 3 does not work, python 2 creates unusable image ? #5

Closed GrahamBriggs closed 9 years ago

GrahamBriggs commented 9 years ago

Tried ff2img.py, ran successfully. Put image file on RPi and it booted to windows screen then went blank.

Tried ff2img.py3, got this error:

GBMacBookPro:diskFormat grahambriggs$ python ffu2img.py3 /Users/grahambriggs/Downloads/Windows_IoT_Core_RPI2_BUILD/Flash.ffu RPiWindows3.img File "ffu2img.py3", line 94 print((str(iBlock) + ' blocks, ' + str((iBlock*FFUStoreHeader.dwBlockSizeInBytes)/1024) + 'kb written '), end='\r') ^

Thank you

t0x0 commented 9 years ago

Are you using the May 12 release of the FFU?

Please reply with the SHA256 hash of the FFU file and the img file converted with Py2.7 (the one that does not work on your Raspberry Pi 2).

What is the output from the script with Py2.7?

What is the full error message with Py3? (you cut off the last line of the error message)

GrahamBriggs commented 9 years ago

Sorry for the delay responding.

I will look at this again tonight and get back to you with answers to your questions.

GB =-=-=-=-=-=-= Graham Briggs

On Jun 22, 2015, at 10:35 PM, toxo notifications@github.com wrote:

Are you using the May 12 release of the FFU?

Please reply with the SHA256 hash of the FFU file and the img file converted with Py2.7 (the one that does not work on your Raspberry Pi 2).

What is the output from the script with Py2.7?

What is the full error message with Py3? (you cut off the last line of the error message)

— Reply to this email directly or view it on GitHub.

t0x0 commented 9 years ago

Any results?

t0x0 commented 9 years ago

I will be closing this issue unless you have anything further to report.

slandsaw commented 8 years ago

Sorry for the comment on an old post. I worked around the same issue by doing the following:

I changed line 94 from this:

print((str(iBlock) + ' blocks, ' + str((iBlock*FFUStoreHeader.dwBlockSizeInBytes)/1024) + 'kb written'), end="\r")

to this:

print((str(iBlock) + ' blocks, ' + str((iBlock*FFUStoreHeader.dwBlockSizeInBytes)/1024) + 'kb written') + '\r')

I also did this same for line 98. That's it! :)

t0x0 commented 8 years ago

Thanks for the input. Can you share your Python version, operating system, and which version of the FFU you converted? I was unable to reproduce the original report, so couldn't confirm a fix.