OpenMarine
Service fails after upgrading from GIT - Printable Version

+- OpenMarine (https://forum.openmarine.net)
+-- Forum: Pypilot (https://forum.openmarine.net/forumdisplay.php?fid=17)
+--- Forum: General discussion (https://forum.openmarine.net/forumdisplay.php?fid=18)
+--- Thread: Service fails after upgrading from GIT (/showthread.php?tid=2924)



Service fails after upgrading from GIT - jamos.tan@gmail.com - 2020-09-13

Just upgraded from GIT, after this the pypilot services take ages to startup.
I test this by doing sudo systemctl status pypilot and sudo systemctl status pypilot_web.
Strange thing is, after these commands it says:

Code:
Loaded: loaded (/etc/systemd/system/pypilot_web.service; enabled; vendor preset
  Active: activating (auto-restart) (Result: exit-code) since Sun 2020-09-13 12:0
 Process: 2349 ExecStart=/usr/local/bin/pypilot_web 8080 (code=exited, status=1/F
Main PID: 2349 (code=exited, status=1/FAILURE)

Sep 13 12:05:03 openplotter systemd[1]: pypilot_web.service: Main process exited,
Sep 13 12:05:03 openplotter systemd[1]: pypilot_web.service: Failed with result 'e

And directly after this the services will be started and active.
However, two things are wrong now:

- webservice flask webpage cannot be loaded
- openplotter control wxwidgets app does not start when clicking the button

When troubleshooting I get these:

Code:
pi@openplotter:~/pypilot/web $ python web.py
Traceback (most recent call last):
 File "web.py", line 14, in <module>
   from flask_socketio import SocketIO, Namespace, emit, join_room, leave_room, \
ImportError: No module named flask_socketio

and this:

Code:
pi@openplotter:~/pypilot/pypilot $ python autopilot.py
('WARNING: python ujson library failed, parsing will consume more cpu', ImportError('No module named ujson',))
Traceback (most recent call last):
 File "autopilot.py", line 21, in <module>
   from pipeserver import pypilotPipeServer
 File "/home/pi/pypilot/pypilot/pipeserver.py", line 15, in <module>
   from pypilot.server import pypilotServer, DEFAULT_PORT, default_persistent_path, LoadPersistentData
ImportError: cannot import name LoadPersistentData


Hope you can help!


RE: Service fails after upgrading from GIT - seandepagnier - 2020-09-13

It seems there are missing python packages... This is normally handled by the openplotter pypilot plugin to install/upgrade these, so I"m not sure why flask_socketio is missing.

Not sure what git you pulled but it's out of date. You will also need to use "python3" not "python" to run the scripts if your default python version is 2.


RE: Service fails after upgrading from GIT - jamos.tan@gmail.com - 2020-09-14

I've followed this manual: https://pypilot.org/wiki/doku.php?id=upgrading_from_git
Probably this one right... https://github.com/openplotter/openplotter-pypilot

For anyone having the same problems as me, I got these ones and had to override some:

Code:
pi@openplotter:~/openplotter-pypilot $ dpkg-buildpackage -b
dpkg-buildpackage: info: source package openplotter-pypilot
dpkg-buildpackage: info: source version 2.0.8-beta
dpkg-buildpackage: info: source distribution bionic
dpkg-buildpackage: info: source changed by Sailoog <info@sailoog.com>
dpkg-buildpackage: info: host architecture armhf
dpkg-source --before-build .
dpkg-checkbuilddeps: error: Unmet build dependencies: python3-all
dpkg-buildpackage: warning: build dependencies/conflicts unsatisfied; aborting
dpkg-buildpackage: warning: (Use -d flag to override.)


Code:
pi@openplotter:~/openplotter-pypilot $ cd ..
pi@openplotter:~ $ sudo dpkg -i openplotter-pypilot_x.x.x-xxx_all.deb
dpkg: error: cannot access archive 'openplotter-pypilot_x.x.x-xxx_all.deb': No such file or directory

I've overriden with the -d flag, but then I got this one:

Code:
dpkg-genbuildinfo
dpkg-genchanges  >../openplotter-pypilot_2.0.8-beta_armhf.changes
dpkg-genchanges: info: including full source code in upload
dpkg-source --after-build .
dpkg-buildpackage: info: full upload; Debian-native package (full source is included)
signfile openplotter-pypilot_2.0.8-beta.dsc
gpg: keybox '/home/pi/.gnupg/pubring.kbx' created
gpg: skipped "Sailoog <info@sailoog.com>": No secret key
gpg: dpkg-sign.MIsvtqbj/openplotter-pypilot_2.0.8-beta.dsc: clear-sign failed: No secret key

dpkg-buildpackage: error: failed to sign .dsc file

Package was created anyway so could be ignored.


RE: Service fails after upgrading from GIT - Sailoog - 2020-09-14

pypilot is installed in openplotter only for python3 not for python2 so dependencies are installed only for python3 too. You must run any pypilot script using just the entry points: "pypilot", "pypilot_web"... or the script using the python version: "python3 autopilot.py", "python3 web.py"