balena-os / jetson-flash

This tool allows users to flash BalenaOS on Jetson supported devices
Apache License 2.0
64 stars 16 forks source link

UnicodeDecodeError #90

Closed etohana closed 1 year ago

etohana commented 1 year ago

jetson-xavier-nx-devkit-emmc, Board Family: t186ref, SoC: Tegra 194, balena-cloud-parking-lot-jetson-xavier-nx-devkit-emmc-2.99.27+rev1-v14.0.8.img Node.js 12.22.12 Python 3.10.6 Pop!_OS 22.04 LTS

Greetings: I am trying to flash BalenaOS on a Xavier NX Module (w/ eMMC). The procedure seems to proceed okay until this point:

File "/tmp/Linux_for_Tegra/bootloader/tegraflash_internal.py", line 164, in print_process outputchar = output.decode('ascii') UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 0: ordinal not in range(128) Failed flashing t186ref.

Is 'ascii' the problem? Should it be 'utf-8' instead? Any advice on how to proceed would be appreciated.

jellyfish-bot commented 1 year ago

[pipex] This has attached https://jel.ly.fish/d2046cba-8bbf-4173-bee0-b799a3824847

pipex commented 1 year ago

Hi there, thanks for reporting this. I found this forum topic on Nvidia that seems to be related https://forums.developer.nvidia.com/t/flashing-xavier-nx-emmc/187379

Could you make sure that you are using python2 as your default python interpreter, i.e. that the binary for python points to python2 and try again?

Please let us know if that works for you

etohana commented 1 year ago

Success! So maybe I was not comprehending the README.md file correctly, but here is where I headed down the wrong path:

This tool runs internally the Linux_for_Tegra package, so we assume you have all the dependencies (libxml2, python3, etc) for this tool installed.

Thank you!

P.S. I thought I'd add one other note. My Linux box did not come with python2 as default. So I apt installed python2 as usual, but I also left python3 alone. I then used the update-alternatives command so that, when necessary, I can easily choose which version of python I wanted to default to when "python" is called.

On Thu, Oct 20, 2022 at 2:23 PM Felipe Lalanne @.***> wrote:

Hi there, thanks for reporting this. I found this forum topic on Nvidia that seems to be related https://forums.developer.nvidia.com/t/flashing-xavier-nx-emmc/187379

Could you make sure that you are using python2 as your default python interpreter, i.e. that the binary for python points to python2 and try again?

Please let us know if that works for you

— Reply to this email directly, view it on GitHub https://github.com/balena-os/jetson-flash/issues/90#issuecomment-1285966178, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE2IDMKNKN2U535FSGNEBY3WEGE2DANCNFSM6AAAAAARJWUZPQ . You are receiving this because you authored the thread.Message ID: @.***>

pipex commented 1 year ago

Thank you for letting us know. I have created a PR updating the README instructions here #91