Hey, language. There are kids on the internet. BTW, your .service file
had the same bug with a small 'i' in Install, so it would not have worked
anyway. But as you said in your later post, you're not getting paid, so
I'm not here to quibble.
Anyway, I enabled the service, but it won't start due to some internal
error:
root@beaglebone:/tinkerforge/Example_project# systemctl start
imusend.service
Job for imusend.service failed because the control process exited with
error code.
See "systemctl status imusend.service" and "journalctl -xe" for details.
root@beaglebone:/tinkerforge/Example_project# systemctl status
imusend.service
รข imusend.service - imu output
Loaded: loaded (/lib/systemd/system/imusend.service; enabled; vendor
preset: enabled)
Active: failed (Result: exit-code) since Sun 2017-01-22 00:25:54 UTC;
16s ago
Process: 7219 ExecStart=/usr/bin/imuout.sh (code=exited, status=1/FAILURE)
Main PID: 7219 (code=exited, status=1/FAILURE)
Jan 22 00:25:54 beaglebone imuout.sh[7219]: <type 'exceptions.TypeError'>:
'NoneType' object is not callable
Jan 22 00:25:54 beaglebone imuout.sh[7219]: Traceback (most recent call
last):
Jan 22 00:25:54 beaglebone imuout.sh[7219]: File
"/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
Jan 22 00:25:54 beaglebone imuout.sh[7219]: File
"/usr/lib/python2.7/threading.py", line 763, in run
Jan 22 00:25:54 beaglebone imuout.sh[7219]: File
"/usr/local/lib/python2.7/dist-packages/tinkerforge/ip_connection.py", line
687, in receive_loop
Jan 22 00:25:54 beaglebone imuout.sh[7219]: <type 'exceptions.TypeError'>:
'NoneType' object is not callable
Jan 22 00:25:54 beaglebone systemd[1]: imusend.service: Main process
exited, code=exited, status=1/FAILURE
Jan 22 00:25:54 beaglebone systemd[1]: Failed to start imu output.
Jan 22 00:25:54 beaglebone systemd[1]: imusend.service: Unit entered failed
state.
Jan 22 00:25:54 beaglebone systemd[1]: imusend.service: Failed with result
'exit-code'.
root@beaglebone:/tinkerforge/Example_project#
The shell file runs fine when I call it from the terminal:
/usr/bin/imuout.sh
But the system won't run it as a service for some reason.
/usr/local/lib/python2.7/dist-packages/tinkerforge/ip_connection.py", line
687 simply reads:
while self.receive_flag:
try:
data = self.socket.recv(8192)
except socket.error:
if self.receive_flag:
e = sys.exc_info()[1]
if e.errno == errno.EINTR:
continue
self.handle_disconnect_by_peer(IPConnection.DISCONNECT_REASON_ERROR,
socket_id, False)
break
687 if len(data) == 0:
if self.receive_flag:
self.handle_disconnect_by_peer(IPConnection.DISCONNECT_REASON_SHUTDOWN,
socket_id, False)
break
pending_data += data
This may be a bug in Python 2.7: http://bugs.python.org/issue14623
Per one recommendation:
The most simple workaround is to add timeout
time.sleep(1)
in the end of script that allows the threads to finish before the script
comes to end of life and close
Haven't figured out where to put a time.sleep(1) line.
On Sat, Jan 21, 2017 at 7:06 PM, William Hermans <[email protected]> wrote:
> On Sat, Jan 21, 2017 at 5:03 PM, Richard Maurer <[email protected]>
> wrote:
> >
> > okay, fair enough, although everything on line states to create a
> symlink. Anyway, I found the error -- if you look at my cut/paste, you'll
> notice {install] -- should be [Install].
> > I was manually copying from my ipad. Knew it was a bad idea at the time.
> > Thanks
>
> So keep in mind when I say it bugs the s**t out of me when someone says
> they followed my instructions when they fail to duplicate my results.
> Because I test everything, and put that test, and instructions in a text
> file. As it happens, I had just done this yesterday, for a client's system
> . . .
>
> --
> For more options, visit http://beagleboard.org/discuss
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "BeagleBoard" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/beagleboard/59BZEmeiSIE/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/beagleboard/CALHSORpSE35wveMR4OPuRAFp%3DY%2BHnsA4FcdgwGRqTswVyZC_BQ%
> 40mail.gmail.com
> <https://groups.google.com/d/msgid/beagleboard/CALHSORpSE35wveMR4OPuRAFp%3DY%2BHnsA4FcdgwGRqTswVyZC_BQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/beagleboard/CAMYVp3kav-n%2BU5_J63uQKBhB_OVP7g9tYehpVrAGjKeX-_PjJg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.