Excellent thank you!
Two updates went fine, but the third gave me this error:
Collecting required packages
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))': /simple wrapt/wrapt-1.12.1-cp37-cp37m-linux_armv7l.whl
Restarting gave mi this:
Detecting system info...
OctoPi version: 0.17.0
Unable to parse Python version string. Please report to me the line below that has caused problems....
[]
Virtual environment is already Python 3, are you sure you need an upgrade?
If you'd rather upgrade a different virtual env, you can enter the full path here
Path:
And got this:
Detecting system info...
OctoPi version: 0.17.0
Traceback (most recent call last):
File "upgrade.py", line 605, in <module>
path_to_venv, commands, config_dir = get_env_config(octopi_valid)
File "upgrade.py", line 268, in get_env_config
if venv_path and not check_venv_python(venv_path):
File "upgrade.py", line 359, in check_venv_python
print_c("Unable to parse Python version string. Please report to me the line below that has caused problems....")
TypeError: print_c() missing 1 required positional argument: 'color'
And yes, no OctoPrint on it:
------------------------------------------------------------------------------
OctoPrint version : unknown
OctoPi version : 0.17.0
------------------------------------------------------------------------------
Managed it:
- Made removed the faulty oprint folder
- made a copy of oprint.bak to oprint
- restarted the process and runs fine
That looks to me like a network issue - not an error generated by the script, so must be pip. Something dropped out during the process is likely why that failed.
And the go_back.py
script does exactly what you mention below to put the old install back .
Great that it worked in the end
Oh and this exception was fixed in a commit I pushed earlier today, it should be working fine for fresh downloads.
One thing I did before the upgrade was a quick house keeping of the disabled plug ins. I simply deleted all the disabled ones from in the plug in manager.
Four OctoPi 0.17's upgraded from 1.4.0 to 1.4.2, then after reading the whole post/Instructions from @Charlie_Powell ran the Python script with no errors on all four. Brilliant.
Thank you @Charlie_Powell and @foosel - I cannot express the gratitude for writing clear instructions on how to do this. People just need to take the time and read this all first.
If you aren't on OctoPi 0.17 then perhaps you should simply do a backup, buy a new microSD and load a fresh image and upgrade it, then restore your backup to it. You already have a year on the old microSD since 0.17 came out, and probably have unplugged the power instead of doing a proper shut down at least once. Cost for a suitable card is cheap. Just do it.
Looking forward to seeing that yellow Python 2 status line drop like a rock... Go Python 3 Green!
@m.hutchinson - Thank you so much for all the positive feedback. It's very much appreciated by both myself and @foosel. I also love seeing a reply here that I can read and appreciate, rather than having to figure out what went wrong!
I'm also looking forward to the moment when Python 3 installs overtake Python 2
@Charlie_Powell You are welcome. Often we don't take the time to say when things go right, only when things go wrong. I see a lot of dissuaded new users respond thinking only problems exist, not success.
Next step may be to ask Guy Sheffer to release OctoPi 0.18.0 with Python 3 installed and help deprecate Python 2. That would also be a chance to get Octoprint 1.42 pre-loaded.
I am well aware of next steps
Hello, I checked if the plugins I installed support Python3 and it's ok, so I ran
"curl -L https://get.octoprint.org/py3/upgrade.py --output upgrade.py python3 upgrade.py"
But I have a mistake:
curl -L https://get.octoprint.org/py3/upgrade.py --output upgrade.py python3 upgrade.py
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 154 100 154 0 0 1540 0 --:--:-- --:--:-- --:--:-- 1555
100 25069 100 25069 0 0 117k 0 --:--:-- --:--:-- --:--:-- 117k
curl: (6) Could not resolve host: python3
curl: (6) Could not resolve host: upgrade.py
can you help me to handle it ?
Thank you
the section python3 upgrade.py
should be the second command, it looks like yours may be thinking it is the same command.
indeed, thank you very much
i have an error
python3-dev is reeds de nieuwste versie (3.7.3-1). is already the newest version
Traceback (most recent call last):
File "upgrade.py", line 595, in
install_python3_dev(backup_location)
File "upgrade.py", line 430, in install_python3_dev
output, poll = run_sys_command(['sudo', 'apt-get', 'install', 'python3-dev', '-y'], sudo=True)
File "upgrade.py", line 105, in run_sys_command
output_line = process.stdout.readline().decode('utf-8')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xef in position 27: invalid continuation byte
sorry for the dutch
upgrade.py stopped also with -f -d
greatings jul
It seems to me the output of apt-get is parsed as utf-8 and this failed.
Do you have LANG with a non utf-8 encoding?
Hey @jul!
Can you verify for me, which version of the script you have? It should be printed at the top.
The newer versions have a fix for your issues, please ensure you have script version V2.1.3
or later. (current is V2.1.8
)
LANG=nl_BE
all the lines from upgrade.py are EN but :
sudo apt-get install python3-dev
Pakketlijsten worden ingelezen... Klaar
Boom van vereisten wordt opgebouwd
De statusinformatie wordt gelezen... Klaar
python3-dev is reeds de nieuwste versie (3.7.3-1).
0 opgewaardeerd, 0 nieuw ge▒nstalleerd, 0 te verwijderen en 19 niet opgewaardeerd.
is dutch : nl_BE
ge▒nstalleerd must be geïnstalleerd i with 2 dots is correct dutch
script current is V2.1.8
octoprint 1.4.2
oktopi 0.17.0
There should be a locale nl_BE.utf8
You could try LANG=nl_BE.utf8
When did you download the script?
I will look at it later, but this line 105:
Is different in the actual script, with a fix, for a while now:
output_line = process.stdout.readline().decode('utf-8', errors="replace")
Please try deleting the old one, then re-downloading it.
I ran the first line of the upgrade script and it seemed to go ok. Then when I ran "python3 upgrade.py", it asked if I wanted to proceed, I hit {enter} to continue,
-- it verified my OctoPi version 0.17.0,
-- it said Getting OctoPrint version ...
-- OctoPrint version 1.3.12
but then in the color RED is stated "Please upgrade to an OctoPrint version >= 1.4.0 for Python 3 compatibility"
I am confused, I thought the script was supposed to be doing that upgrade for me??? Now I am not sure what the next step is, can someone explain?