This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with GPIO push button inputs following Pypilot upgrade
#31
Don't get any webpage.  Get this when running hat:

web failed to run process: module 'web' has no attribute 'web_process'

Can do without webpage, I just need to configure my buttons, LCD works.  Used my hat.config from .16 - use 'auto' to toggle the AP.  The first time I press auto it will engage the AP if it is off.  When I try to toggle it off I get this:

Traceback (most recent call last):
  File "/usr/local/bin/pypilot_hat", line 11, in <module>
    load_entry_point('pypilot==0.24', 'console_scripts', 'pypilot_hat')()
  File "/usr/local/lib/python3.7/dist-packages/pypilot-0.24-py3.7-linux-armv7l.egg/pypilot/hat/hat.py", line 448, in main
    hat.poll()
  File "/usr/local/lib/python3.7/dist-packages/pypilot-0.24-py3.7-linux-armv7l.egg/pypilot/hat/hat.py", line 394, in poll
    i.poll()
  File "/usr/local/lib/python3.7/dist-packages/pypilot-0.24-py3.7-linux-armv7l.egg/pypilot/hat/lcd.py", line 327, in poll
    next_page = self.page.process()
  File "/usr/local/lib/python3.7/dist-packages/pypilot-0.24-py3.7-linux-armv7l.egg/pypilot/hat/page.py", line 732, in process
    speed = keys[key][0]
KeyError: 0
got signal atexit cleaning up 2409
got signal 17 cleaning up 2409
subprocess returned (0, 0) []
got signal 17 cleaning up 2409
Reply
#32
basically, pypilot is not installed properly

I need to rearrange the modules to get it to work on all the slightly different versions of python 3.
Reply
#33
At first I thought it was just something in my configuration but I actually tried a fresh install of openplotter to start fresh and followed the steps in the pypilot workbook before posting my issue here. Curious if forcing specific flask version after .24 upgrade as opposed to prior .24 upgrade would produce different results but didn't have time to experiment with that.

As of now I am running hat.py instead of pypilot_hat and have web interface. Still have the same problem with 'auto' only able to enable the AP but all other functions of pypilot I've tested are working so I'm happy.

I understand pypilot and openplotter are large projects and want to thank you and the openmarine community for all of the effort that's been put forward. The value it adds to my sailing experience is great.
Reply
#34
I have corrected the issue in git now.
Reply
#35
Hi All.

First off, a huge thank you to Sean for getting Pypilot this far.  I am running the Pypilot hat on a Pi4 with a fresh install of Openplotter and Pypilot 0.24.  I have tried the above fixes and none seem to work for me to be able to access the web interface or for the LCD display to work on the hat.  All else seems to be working just fine including the OpenCPN interface.  I have placed below the output from pypilot_hat, pypilot_hat none, pypilot_web and pypilot_web none below.

Any help would be most appreciated. Thank you!


pi@openplotter:~/pypilot $ pypilot_hat
have gpio for raspberry pi
loading config file: /home/pi/.pypilot/hat.conf
loaded device tree hat config
 
pi@openplotter:~/pypilot $ pypilot_hat none
have gpio for raspberry pi
loading config file: /home/pi/.pypilot/hat.conf
loaded device tree hat config
overriding driver jlx12864  to command line none
set language en
arduino process on  1654
connect failed to none:23322 [Errno -5] No address associated with hostname
renice: failed to set priority for 1654 (process ID): Permission denied
warning, failed to renice hat arduino process
hat firmware not in /home/pi/.pypilot/hat.hex
skipping verification
arduino on spidev0.1
failed to communicate with arduino /dev/spidev0.1 [Errno 2] No such file or directory
1656 (process ID) old priority 0, new priority 19
connect failed to none:23322 [Errno -5] No address associated with hostname
connect failed to none:23322 [Errno -5] No address associated with hostname
connect failed to none:23322 [Errno -5] No address associated with hostname
connect failed to none:23322 [Errno -5] No address associated with hostname
failed to load lirc No module named 'lirc'....
 
pi@openplotter:~/pypilot $ pypilot_web
using default port of 8000
failed to import flask_babel, translations not possible!!
processing clients
 
pi@openplotter:~/pypilot $ pypilot_web none
Traceback (most recent call last):
  File "/usr/local/bin/pypilot_web", line 11, in <module>
    load_entry_point('pypilot==0.24', 'console_scripts', 'pypilot_web')()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 489, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2793, in load_entry_point
    return ep.load()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2411, in load
    return self.resolve()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2417, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/local/lib/python3.7/dist-packages/pypilot-0.24-py3.7-linux-armv7l.egg/pypilot/web/web.py", line 24, in <module>
    pypilot_web_port=int(sys.argv[1])
ValueError: invalid literal for int() with base 10: 'none'
Reply
#36
the various pypilot clients remember the host you used and try to re-use it. You managed to set this host to "none" so nothing will connect.

passing the host to the web is not possible at this point in time. Check ~/.pypilot/pypilot_client.conf

ensure pypilot_client works. Use the -s option to set the host, in this case probably localhost, eg: "pypilot client -s localhost"
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)