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
#21
still curious about the outcome of those statements and the output of pypilot_hat none after that patch?

It might not be important for you now but it might help others in the future. Thx!
Reply
#22
I ran the patch again and saw there were a load of errors to do with permissions:
pi@openpcpn:~ $ pip3 uninstall python-socketio python-engineio flask-socketio
Uninstalling python-socketio-5.1.0:
Would remove:
/usr/local/lib/python3.7/dist-packages/python_socketio-5.1.0.dist-info/*
/usr/local/lib/python3.7/dist-packages/socketio/*
Proceed (y/n)? y
Exception:
Traceback (most recent call last):
File "/usr/lib/python3.7/shutil.py", line 563, in move
os.rename(src, real_dst)
PermissionError: [Errno 13] Permission denied: '/usr/local/lib/python3.7/dist-packages/python_socketio-5.1.0.dist-info/INSTALLER' -> '/tmp/pip-uninstall-u3krkdgm/usr/local/lib/python3.7/dist-packages/python_socketio-5.1.0.dist-info/INSTALLER'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pip/_internal/cli/base_command.py", line 143, in main
status = self.run(options, args)
File "/usr/lib/python3/dist-packages/pip/_internal/commands/uninstall.py", line 75, in run
auto_confirm=options.yes, verbose=self.verbosity > 0,
File "/usr/lib/python3/dist-packages/pip/_internal/req/req_install.py", line 683, in uninstall
uninstalled_pathset.remove(auto_confirm, verbose)
File "/usr/lib/python3/dist-packages/pip/_internal/req/req_uninstall.py", line 224, in remove
renames(path, new_path)
File "/usr/lib/python3/dist-packages/pip/_internal/utils/misc.py", line 280, in renames
shutil.move(old, new)
File "/usr/lib/python3.7/shutil.py", line 578, in move
os.unlink(src)
PermissionError: [Errno 13] Permission denied: '/usr/local/lib/python3.7/dist-packages/python_socketio-5.1.0.dist-info/INSTALLER'

so I did it again with sudo in front of pip3:
pi@openpcpn:~ $ sudo pip3 uninstall python-socketio python-engineio flask-socketio
Uninstalling python-socketio-5.1.0:
Would remove:
/usr/local/lib/python3.7/dist-packages/python_socketio-5.1.0.dist-info/*
/usr/local/lib/python3.7/dist-packages/socketio/*
Proceed (y/n)? y
Successfully uninstalled python-socketio-5.1.0
Uninstalling python-engineio-4.0.1:
Would remove:
/usr/local/lib/python3.7/dist-packages/engineio/*
/usr/local/lib/python3.7/dist-packages/python_engineio-4.0.1.dist-info/*
Proceed (y/n)? y
Successfully uninstalled python-engineio-4.0.1
Not uninstalling flask-socketio at /usr/lib/python3/dist-packages, outside environment /usr
Can't uninstall 'Flask-SocketIO'. No files were found to uninstall.
pi@openpcpn:~ $
pi@openpcpn:~ $ pip3 install flask-socketio<5""flask-socketio<5"
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: flask-socketio<5 in /usr/lib/python3/dist-packages (2.9.0)
Collecting python-socketio>=1.5.0 (from flask-socketio<5)
Downloading https://files.pythonhosted.org/packages/...ne-any.whl (53kB)

19% |###### | 10kB 3.7MB/s eta 0:00:01
38% |############ | 20kB 4.2MB/s eta 0:00:01
57% |################## | 30kB 4.1MB/s eta 0:00:01
76% |######################## | 40kB 3.5MB/s eta 0:00:01
96% |############################## | 51kB 2.7MB/s eta 0:00:01
100% |################################| 61kB 1.5MB/s
Requirement already satisfied: bidict>=0.21.0 in /usr/local/lib/python3.7/dist-packages (from python-socketio>=1.5.0->flask-socketio<5) (0.21.2)
Collecting python-engineio>=4 (from python-socketio>=1.5.0->flask-socketio<5)
Downloading https://files.pythonhosted.org/packages/...ne-any.whl (50kB)

20% |###### | 10kB 3.5MB/s eta 0:00:01
40% |############ | 20kB 3.7MB/s eta 0:00:01
60% |################### | 30kB 4.2MB/s eta 0:00:01
80% |######################### | 40kB 4.4MB/s eta 0:00:01
100% |################################| 51kB 1.8MB/s
Installing collected packages: python-engineio, python-socketio
Successfully installed python-engineio-4.0.1 python-socketio-5.1.0

I also set pi.ir to false in hat.conf. Running pypilot.hat none now I get:

pypilot_hat none
have gpio for raspberry pi
loading config file: /home/pi/.pypilot/hat.conf
failed to load /proc/device-tree/hat/custom_0 : [Errno 2] No such file or directory: '/proc/device-tree/hat/custom_0'
overriding driver default to command line none
arduino process on 1985
renice: failed to set priority for 1985 (process ID): Permission denied
warning, failed to renice hat arduino process
No hat config, arduino not found
1986 (process ID) old priority 0, new priority 19
web process 1986
web config {'remote': False, 'host': 'pypilot', 'actions': {'auto': [], 'menu': [], 'up': [], 'down': [], 'select': [], 'left': [], 'right': [], 'engage': ['gpio17'], 'disengage': ['gpio23'], '1': ['gpio27'], '-1': ['gpio22'], '2': [], '-2': [], '10': ['gpio5'], '-10': ['gpio6'], 'compassmode': ['gpio18'], 'gpsmode': [], 'windmode': ['gpio26'], 'tackport': [], 'tackstarboard': []}, 'pi.ir': False, 'arduino.ir': False, 'arduino.nmea.in': False, 'arduino.nmea.out': False, 'arduino.nmea.baud': 4800, 'lcd': {'contrast': 60, 'invert': False, 'backlight': 200, 'flip': False, 'language': 'en', 'bigstep': 10, 'smallstep': 1, 'remote': False, 'hue': 27}}
web process on port 33333
The client is using an unsupported version of the Socket.IO or Engine.IO protocols (further occurrences of this error will be logged with level INFO)

The web pages on 33333 and 8080 both show no connection to pypilot.

Hope this helps
Regards
David
Reply
#23
Thanks for doing this!

This looks weird: pi@openpcpn:~ $ pip3 install flask-socketio<5""flask-socketio<5"

Can you try it again, this time with sudo's:

Code:
sudo pip3 uninstall python-socketio python-engineio flask-socketio
sudo pip3 install "flask-socketio<5"

You are on the latest openplotter image, right?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)