Problems flashing Librem5

I need a clean install of Pureos on my Librem, and following all the guides out there I run into errors at

./scripts/librem5-flash-image

that ends with the following messages:

...
  File "/usr/lib/python3/dist-packages/urllib3/util/timeout.py", line 156, in _validate_timeout
    raise ValueError(
ValueError: Timeout value connect was <object object at 0x75f68cb544c0>, but it must be an int, float or None.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/roman/librem5-flash-image/./scripts/librem5-flash-image", line 538, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/roman/librem5-flash-image/./scripts/librem5-flash-image", line 464, in main
    image_ref = find_image(args.image_job, board, args.variant, args.dist, args.stable)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/roman/librem5-flash-image/./scripts/librem5-flash-image", line 275, in find_image
    return find_image_jenkins(jobname, board, variant, dist)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/roman/librem5-flash-image/./scripts/librem5-flash-image", line 224, in find_image_jenkins
    info = server.get_job_info(jobname)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/jenkins/__init__.py", line 475, in get_job_info
    raise JenkinsException(
jenkins.JenkinsException: Could not parse JSON info for job[Images/Image Build]

Would be grateful if anyone could point me in the right direction. Just trying to get back to a clean install.

1 Like

hi romanb,

sorry i do not used that script before so i am not a big help. But the errors are there if you try to use an old python Script, like one for python 3.8.x with python 3.11.5 or newer. Its kind of a mess that every python version use 3.x.y scheme.

If you install the right Version and launch that script with the old python-version you can use it. The more complex way is to adjust the script manually to a newer one if you can not install some old version.

Sebastian Krzyszkowiak wrote this, 3 years ago i think he could help: @dos

Edit: You could try Python Version 3.10.x or 3.9.x - that was stable on Debian in 2021.

Edit2: But since it is important to got all done 100 percent perfect. Maybe you should wait for an up2date script is released or some one can test this before. Since it is bad to get stuck with a not boot able device, because of a script issue. The first errors do not look like a big issue and i think it should run fine if you have the old python version. However if you not have a dry run option to simulate the update i would wait or send the phone back to support/purism. Or just try to mail the support. Be patient and make backups.

1 Like

I recommend adding --stable to the arguments to the script.

1 Like

Thanks for your suggestions but that hasn’t solved it .
Since it’s the “officially” described way to reflash in the wiki, maybe I can point someone from purism at it?

1 Like

Use these instructions:

I really don’t know how I goofed up, but following your above instructions everything worked fine from within a pureos 10 live system…

I had my errors using Ubuntu 24.04, and using a live pureos 11 didn’t work either.
Thanks a lot.

1 Like

Great, mark my post as a solution.