Explore HAT segmentation fault


#1

The code:

import explorerhat
import sys
try:
V2 = explorerhat.analog.one.read()
print(’{0:5.2f} volts’.format(round(V2,2)))
except:
e = sys.exc_info()[0]
print(‘exiting’)

on RPi gives

root@raspberrypi:~/.node-red/my_code# python analog.py
Explorer HAT Pro detected…
2.25 volts

Explorer HAT exiting cleanly, please wait…
Stopping flashy things…
Stopping user tasks…
Cleaning up…
Goodbye!
Segmentation fault
root@raspberrypi:~/.node-red/my_code#


#2

This crops up from time to time, but doesn’t cause any issues- at least none that I’ve come across. I believe it’s something inside RPi.GPIO, but I haven’t dedicated the time to digging up why it happens yet.


#3

thanks, the problem is that when I run it from exec node on nodered, the exception freezes nodered and RPi.