Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

ValueError in _handle_interrupt(self, fileno, val) #33

Open
jhburkhard opened this issue Aug 20, 2014 · 0 comments
Open

ValueError in _handle_interrupt(self, fileno, val) #33

jhburkhard opened this issue Aug 20, 2014 · 0 comments

Comments

@jhburkhard
Copy link

Received the following exception

Exception in thread Thread-39:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 505, in run
self.__target(_self.__args, *_self.__kwargs)
File "/usr/local/lib/python2.7/dist-packages/RPIO-0.10.0-py2.7-linux-armv6l.egg/RPIO/_RPIO.py", line 320, in wait_for_interrupts
self._handle_interrupt(fileno, val)
File "/usr/local/lib/python2.7/dist-packages/RPIO-0.10.0-py2.7-linux-armv6l.egg/RPIO/_RPIO.py", line 241, in _handle_interrupt
val = int(val)
ValueError: invalid literal for int() with base 10: ''

Please advise if you need more information. The code has been running for several days and this error has occurred once. The code seems to be continuing to run correctly.

Setup is:
RPIO.add_interrupt_callback( 4, self.callBack, edge = 'rising', threaded_callback = True,debounce_timeout_ms = 50)

Interrupts on GPIO 4 are triggered by the interrupt pin from a MCP23008 which monitors 8 limit switches.
On an interrupt, the callback routine posts a message on a queue .

The operational process (simplified) is:
Clear the queue
RPIO.wait_for_interrupts( threaded = True )
Enable MS23008 interrupts
while True:
try :
msg = queue.get( block=True, timeout=2.0)
Process interrupt message
break
except Queue,Empty:
break
disable MS23008 interrupts
RPIO.stop_waiting_for_interrupts()

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant