After upgrading my version of python (3.8 to 3.12) on my Raspberry Pi 4 B, I now have the following error when attempting to connect to my Mycodo project.
** Error 502: Bad Gateway Error**
The last 50 lines from the Mycodo frontend web log are as follows:
This is the error message I have:
pi@raspberrypi:/usr/local/bin $ journalctl -u mycodoflask | tail -n 50
Dec 16 16:28:51 raspberrypi python[2072]: top: bad pid 'None'
Dec 16 18:32:59 raspberrypi python[546]: [2023-12-16 18:32:59 +1100] [546] [INFO] Handling signal: term
Dec 16 18:32:59 raspberrypi systemd[1]: Stopping Mycodo web user interface...
Dec 16 18:33:00 raspberrypi python[1595]: [2023-12-16 18:33:00 +1100] [1595] [INFO] Worker exiting (pid: 1595)
Dec 16 18:33:01 raspberrypi python[546]: [2023-12-16 18:33:01 +1100] [546] [INFO] Shutting down: Master
Dec 16 18:33:01 raspberrypi systemd[1]: mycodoflask.service: Succeeded.
Dec 16 18:33:01 raspberrypi systemd[1]: Stopped Mycodo web user interface.
Dec 16 18:33:01 raspberrypi systemd[1]: mycodoflask.service: Consumed 1min 32.764s CPU time.
-- Boot fe8b677608bd4e0c9b61ff8a1dc61b4d --
Dec 16 18:33:11 raspberrypi systemd[1]: Started Mycodo web user interface.
Dec 16 18:33:11 raspberrypi systemd[584]: mycodoflask.service: Failed to locate executable /var/mycodo-root/env/bin/python: No such file or directory
Dec 16 18:33:11 raspberrypi systemd[584]: mycodoflask.service: Failed at step EXEC spawning /var/mycodo-root/env/bin/python: No such file or directory
Dec 16 18:33:11 raspberrypi systemd[1]: mycodoflask.service: Main process exited, code=exited, status=203/EXEC
Dec 16 18:33:11 raspberrypi systemd[1]: mycodoflask.service: Failed with result 'exit-code'.
-- Boot a522d140eb9d418dad4c0ff41329ce80 --
Dec 16 18:57:00 raspberrypi systemd[1]: Started Mycodo web user interface.
Dec 16 18:57:00 raspberrypi systemd[574]: mycodoflask.service: Failed to locate executable /var/mycodo-root/env/bin/python: No such file or directory
Dec 16 18:57:00 raspberrypi systemd[574]: mycodoflask.service: Failed at step EXEC spawning /var/mycodo-root/env/bin/python: No such file or directory
Dec 16 18:57:01 raspberrypi systemd[1]: mycodoflask.service: Main process exited, code=exited, status=203/EXEC
Dec 16 18:57:01 raspberrypi systemd[1]: mycodoflask.service: Failed with result 'exit-code'.
-- Boot 2c7906654b1a47e09460b265a03fb451 --
Dec 16 19:06:30 raspberrypi systemd[1]: Started Mycodo web user interface.
Dec 16 19:06:30 raspberrypi systemd[567]: mycodoflask.service: Failed to locate executable /var/mycodo-root/env/bin/python: No such file or directory
Dec 16 19:06:30 raspberrypi systemd[567]: mycodoflask.service: Failed at step EXEC spawning /var/mycodo-root/env/bin/python: No such file or directory
Dec 16 19:06:30 raspberrypi systemd[1]: mycodoflask.service: Main process exited, code=exited, status=203/EXEC
Dec 16 19:06:30 raspberrypi systemd[1]: mycodoflask.service: Failed with result 'exit-code'.
-- Boot 9db5256a3a5d4f33abeb447cb79ed323 --
Dec 16 20:37:25 raspberrypi systemd[1]: Started Mycodo web user interface.
Dec 16 20:37:25 raspberrypi systemd[549]: mycodoflask.service: Failed to locate executable /var/mycodo-root/env/bin/python: No such file or directory
Dec 16 20:37:25 raspberrypi systemd[549]: mycodoflask.service: Failed at step EXEC spawning /var/mycodo-root/env/bin/python: No such file or directory
Dec 16 20:37:25 raspberrypi systemd[1]: mycodoflask.service: Main process exited, code=exited, status=203/EXEC
Dec 16 20:37:25 raspberrypi systemd[1]: mycodoflask.service: Failed with result 'exit-code'.
-- Boot 47093759fdd34dbaa15cc66796025610 --
Dec 17 08:26:37 raspberrypi systemd[1]: Started Mycodo web user interface.
Dec 17 08:26:37 raspberrypi systemd[563]: mycodoflask.service: Failed to locate executable /var/mycodo-root/env/bin/python: No such file or directory
Dec 17 08:26:37 raspberrypi systemd[563]: mycodoflask.service: Failed at step EXEC spawning /var/mycodo-root/env/bin/python: No such file or directory
Dec 17 08:26:38 raspberrypi systemd[1]: mycodoflask.service: Main process exited, code=exited, status=203/EXEC
Dec 17 08:26:38 raspberrypi systemd[1]: mycodoflask.service: Failed with result 'exit-code'.
-- Boot e2b4a2acf8544835b973cfe879afda08 --
Dec 17 08:46:53 raspberrypi systemd[1]: Started Mycodo web user interface.
Dec 17 08:46:53 raspberrypi systemd[543]: mycodoflask.service: Failed to locate executable /var/mycodo-root/env/bin/python: No such file or directory
Dec 17 08:46:53 raspberrypi systemd[543]: mycodoflask.service: Failed at step EXEC spawning /var/mycodo-root/env/bin/python: No such file or directory
Dec 17 08:46:53 raspberrypi systemd[1]: mycodoflask.service: Main process exited, code=exited, status=203/EXEC
Dec 17 08:46:53 raspberrypi systemd[1]: mycodoflask.service: Failed with result 'exit-code'.
-- Boot 5c56e2db3d324b8fbe56b250141504e4 --
Dec 17 09:52:37 raspberrypi systemd[1]: Started Mycodo web user interface.
Dec 17 09:52:37 raspberrypi systemd[579]: mycodoflask.service: Failed to locate executable /var/mycodo-root/env/bin/python: No such file or directory
Dec 17 09:52:37 raspberrypi systemd[579]: mycodoflask.service: Failed at step EXEC spawning /var/mycodo-root/env/bin/python: No such file or directory
Dec 17 09:52:38 raspberrypi systemd[1]: mycodoflask.service: Main process exited, code=exited, status=203/EXEC
Dec 17 09:52:38 raspberrypi systemd[1]: mycodoflask.service: Failed with result 'exit-code'.
pi@raspberrypi:/usr/local/bin $ journalctl -u mycodoflask | tail -n 50
Dec 16 16:28:51 raspberrypi python[2072]: top: bad pid 'None'
Dec 16 18:32:59 raspberrypi python[546]: [2023-12-16 18:32:59 +1100] [546] [INFO] Handling signal: term
Dec 16 18:32:59 raspberrypi systemd[1]: Stopping Mycodo web user interface...
Dec 16 18:33:00 raspberrypi python[1595]: [2023-12-16 18:33:00 +1100] [1595] [INFO] Worker exiting (pid: 1595)
Dec 16 18:33:01 raspberrypi python[546]: [2023-12-16 18:33:01 +1100] [546] [INFO] Shutting down: Master
Dec 16 18:33:01 raspberrypi systemd[1]: mycodoflask.service: Succeeded.
Dec 16 18:33:01 raspberrypi systemd[1]: Stopped Mycodo web user interface.
Dec 16 18:33:01 raspberrypi systemd[1]: mycodoflask.service: Consumed 1min 32.764s CPU time.
-- Boot fe8b677608bd4e0c9b61ff8a1dc61b4d --
Dec 16 18:33:11 raspberrypi systemd[1]: Started Mycodo web user interface.
Dec 16 18:33:11 raspberrypi systemd[584]: mycodoflask.service: Failed to locate executable /var/mycodo-root/env/bin/python: No such file or directory
Dec 16 18:33:11 raspberrypi systemd[584]: mycodoflask.service: Failed at step EXEC spawning /var/mycodo-root/env/bin/python: No such file or directory
Dec 16 18:33:11 raspberrypi systemd[1]: mycodoflask.service: Main process exited, code=exited, status=203/EXEC
Dec 16 18:33:11 raspberrypi systemd[1]: mycodoflask.service: Failed with result 'exit-code'.
-- Boot a522d140eb9d418dad4c0ff41329ce80 --
Dec 16 18:57:00 raspberrypi systemd[1]: Started Mycodo web user interface.
Dec 16 18:57:00 raspberrypi systemd[574]: mycodoflask.service: Failed to locate executable /var/mycodo-root/env/bin/python: No such file or directory
Dec 16 18:57:00 raspberrypi systemd[574]: mycodoflask.service: Failed at step EXEC spawning /var/mycodo-root/env/bin/python: No such file or directory
Dec 16 18:57:01 raspberrypi systemd[1]: mycodoflask.service: Main process exited, code=exited, status=203/EXEC
Dec 16 18:57:01 raspberrypi systemd[1]: mycodoflask.service: Failed with result 'exit-code'.
-- Boot 2c7906654b1a47e09460b265a03fb451 --
Dec 16 19:06:30 raspberrypi systemd[1]: Started Mycodo web user interface.
Dec 16 19:06:30 raspberrypi systemd[567]: mycodoflask.service: Failed to locate executable /var/mycodo-root/env/bin/python: No such file or directory
Dec 16 19:06:30 raspberrypi systemd[567]: mycodoflask.service: Failed at step EXEC spawning /var/mycodo-root/env/bin/python: No such file or directory
Dec 16 19:06:30 raspberrypi systemd[1]: mycodoflask.service: Main process exited, code=exited, status=203/EXEC
Dec 16 19:06:30 raspberrypi systemd[1]: mycodoflask.service: Failed with result 'exit-code'.
-- Boot 9db5256a3a5d4f33abeb447cb79ed323 --
Dec 16 20:37:25 raspberrypi systemd[1]: Started Mycodo web user interface.
Dec 16 20:37:25 raspberrypi systemd[549]: mycodoflask.service: Failed to locate executable /var/mycodo-root/env/bin/python: No such file or directory
Dec 16 20:37:25 raspberrypi systemd[549]: mycodoflask.service: Failed at step EXEC spawning /var/mycodo-root/env/bin/python: No such file or directory
Dec 16 20:37:25 raspberrypi systemd[1]: mycodoflask.service: Main process exited, code=exited, status=203/EXEC
Dec 16 20:37:25 raspberrypi systemd[1]: mycodoflask.service: Failed with result 'exit-code'.
-- Boot 47093759fdd34dbaa15cc66796025610 --
Dec 17 08:26:37 raspberrypi systemd[1]: Started Mycodo web user interface.
Dec 17 08:26:37 raspberrypi systemd[563]: mycodoflask.service: Failed to locate executable /var/mycodo-root/env/bin/python: No such file or directory
Dec 17 08:26:37 raspberrypi systemd[563]: mycodoflask.service: Failed at step EXEC spawning /var/mycodo-root/env/bin/python: No such file or directory
Dec 17 08:26:38 raspberrypi systemd[1]: mycodoflask.service: Main process exited, code=exited, status=203/EXEC
Dec 17 08:26:38 raspberrypi systemd[1]: mycodoflask.service: Failed with result 'exit-code'.
-- Boot e2b4a2acf8544835b973cfe879afda08 --
Dec 17 08:46:53 raspberrypi systemd[1]: Started Mycodo web user interface.
Dec 17 08:46:53 raspberrypi systemd[543]: mycodoflask.service: Failed to locate executable /var/mycodo-root/env/bin/python: No such file or directory
Dec 17 08:46:53 raspberrypi systemd[543]: mycodoflask.service: Failed at step EXEC spawning /var/mycodo-root/env/bin/python: No such file or directory
Dec 17 08:46:53 raspberrypi systemd[1]: mycodoflask.service: Main process exited, code=exited, status=203/EXEC
Dec 17 08:46:53 raspberrypi systemd[1]: mycodoflask.service: Failed with result 'exit-code'.
-- Boot 5c56e2db3d324b8fbe56b250141504e4 --
Dec 17 09:52:37 raspberrypi systemd[1]: Started Mycodo web user interface.
Dec 17 09:52:37 raspberrypi systemd[579]: mycodoflask.service: Failed to locate executable /var/mycodo-root/env/bin/python: No such file or directory
Dec 17 09:52:37 raspberrypi systemd[579]: mycodoflask.service: Failed at step EXEC spawning /var/mycodo-root/env/bin/python: No such file or directory
Dec 17 09:52:38 raspberrypi systemd[1]: mycodoflask.service: Main process exited, code=exited, status=203/EXEC
Dec 17 09:52:38 raspberrypi systemd[1]: mycodoflask.service: Failed with result 'exit-code'.
If I try to establish the version of python I receive the following details:
pi@raspberrypi:~ $ python -v
bash: /usr/local/bin/python3.8: No such file or directory
This is the contents of the /usr/local/bin/ directory:
pi@raspberrypi:/usr/local/bin $ dir
2to3-3.12 pig2vcd pigs pip3 pip3.9 python3.12 virtualenv
idle3.12 pigpiod pip pip3.12 pydoc3.12 python3.12-config
I have googled for a solution, but I cannot find a solution.
Any assistance would be great.