-
-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gnssserver crash - 'NoneType' object has no attribute 'talker' #17
Comments
Hi, sorry you're having difficulties.
I can certainly look into improving the exception handling, but can I just confirm that the device is a NEO- M8P and get a FULL TRACEBACK of the error INCLUDING the actual command line entered for gnssserver. This should start something like this:
➜ pygnssutils git:(finvestigate-M8P-parse-error) ✗gnssserver -I /dev/ttyACM1
2023-03-02 01:01:49.223657: Starting server (type CTRL-C to stop)...
2023-03-02 01:01:49.223682: Starting input thread, reading from /dev/ttyACM1...
2023-03-02 01:01:49.224174: Parsing GNSS data stream from: Serial<id=0x7fa3efaf3f10, open=True>(port='/dev/ttyACM1', baudrate=9600, bytesize=8, parity='N', stopbits=1, timeout=3, xonxoff=False, rtscts=False, dsrdtr=False)...
2023-03-02 01:01:49.724130: Starting output thread, broadcasting on 0.0.0.0:50010...
2023-03-02 01:01:55.792132: Client ('127.0.0.1', 36888) has connected. Total clients: 1
If you're able, I'd appreciate a sample raw (unparsed) output log from your /dev/ttyACM0 device, e.g. using screen:
screen /dev/ttyACM0 > output.log
Thanks
|
@semuadmin Thanks for the quick response. Here is the full log:
|
Thanks for this.
I can handle the exception easily enough, but I'd like to get to the bottom of the cause. I'm not currently able to recreate the error using a standard M8 dev module.
Would it be at all possible to send me a sample of the raw output from the port? If you don't want to post it with this issue, you can send it to me directly via the email address at the bottom of the GitHub page.
Thanks again.
…--
semuadmin
SEMU Consulting
https://github.com/semuconsulting
________________________________
From: nakai-omer ***@***.***>
Sent: Thursday, March 2, 2023 2:06:39 PM
To: semuconsulting/pygnssutils ***@***.***>
Cc: semuadmin ***@***.***>; Mention ***@***.***>
Subject: Re: [semuconsulting/pygnssutils] gnssserver crash - 'NoneType' object has no attribute 'talker' (Issue #17)
@semuadmin<https://github.com/semuadmin> Thanks for the quick response.
The device is a: Here+ RTK Base, which is M8P behind the scenes.
Here is the full log:
gnssserver --inport "/dev/ttyACM0"
2023-03-02 14:58:20.937997: Starting server (type CTRL-C to stop)...
2023-03-02 14:58:20.938021: Starting input thread, reading from /dev/ttyACM0...
2023-03-02 14:58:20.938574: Parsing GNSS data stream from: Serial<id=0x7f9503cc6740, open=True>(port='/dev/ttyACM0', baudrate=9600, bytesize=8, parity='N', stopbits=1, timeout=3, xonxoff=False, rtscts=False, dsrdtr=False)...
2023-03-02 14:58:21.439054: Starting output thread, broadcasting on 0.0.0.0:50010...
2023-03-02 14:58:37.165334: Client ('127.0.0.1', 59544) has connected. Total clients: 1
2023-03-02 14:58:43.054499: Client ('127.0.0.1', 59544) has disconnected. Total clients: 0
2023-03-02 14:59:55.471602: Client ('127.0.0.1', 46638) has connected. Total clients: 1
2023-03-02 15:00:01.066177: Client ('127.0.0.1', 46638) has disconnected. Total clients: 0
Exception in thread Thread-1 (_input_thread):
Traceback (most recent call last):
File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
self.run()
File "/usr/lib/python3.10/threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "/home/amram/.local/lib/python3.10/site-packages/pygnssutils/gnssserver.py", line 212, in _input_thread
self._streamer.run()
File "/home/amram/.local/lib/python3.10/site-packages/pygnssutils/gnssdump.py", line 237, in run
self._start_reader()
File "/home/amram/.local/lib/python3.10/site-packages/pygnssutils/gnssdump.py", line 283, in _start_reader
self._do_parse()
File "/home/amram/.local/lib/python3.10/site-packages/pygnssutils/gnssdump.py", line 349, in _do_parse
self._do_error(err)
File "/home/amram/.local/lib/python3.10/site-packages/pygnssutils/gnssdump.py", line 429, in _do_error
raise err
File "/home/amram/.local/lib/python3.10/site-packages/pygnssutils/gnssdump.py", line 328, in _do_parse
msgidentity = parsed_data.talker + parsed_data.msgID
AttributeError: 'NoneType' object has no attribute 'talker'
—
Reply to this email directly, view it on GitHub<#17 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AGZ7C32XYB5HLAUMPJYDFSLW2CLN7ANCNFSM6AAAAAAVMG4QPA>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
@semuadmin It doesn't happen immediately would you like just any sample data? or to try to catch the data before the crash? Maybe I should print the raw_data before it tries to access ".talker"? |
As much data as it normally takes before it crashes? Say 2 or 3 minutes of raw data from the /dev/ttyACM0 port, if that's usually enough.
Thanks
…--
semuadmin
SEMU Consulting
https://github.com/semuconsulting
________________________________
From: nakai-omer ***@***.***>
Sent: Thursday, March 2, 2023 5:10:23 PM
To: semuconsulting/pygnssutils ***@***.***>
Cc: semuadmin ***@***.***>; Mention ***@***.***>
Subject: Re: [semuconsulting/pygnssutils] gnssserver crash - 'NoneType' object has no attribute 'talker' (Issue #17)
@semuadmin<https://github.com/semuadmin> It doesn't happen immediately would you like just any sample data? or to try to catch the data before the crash?
—
Reply to this email directly, view it on GitHub<#17 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AGZ7C35MQTDZCBAE6BERS7TW2DA67ANCNFSM6AAAAAAVMG4QPA>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
@nakai-omer I've added a PR which address the specific error reported, but it doesn't necessarily address the root cause of the issue, which I'm still unable to recreate. If you are able to provide some representative output from your M8P device that would be much appreciated. |
@nakai-omer I've merged the PR which addresses the specific error reported, but it doesn't necessarily address the root cause of the issue, which I'm still unable to recreate. If you are able to provide some representative output from your M8P device that would be much appreciated. |
@semuadmin So sorry for the late reply, and thanks a lot for your help. I added a print of the raw_data variable before the crash, and the raw_data causing the error was:
|
Hi @nakai-omer Thanks for this - really useful. Clearly neither $GLG or GPG are legitimate NMEA sentences, so this would appear to be spurious output from the receiver or port. Are you able to confirm that the changes made address the original error? This spurious data should simply be ignored now without causing a 'NoneType' error. |
@semuadmin Looks stable now, thanks a lot for the awesome support! |
First of all thanks a lot for all the good gnss related libs.
When running gnnsserver, it randomly crashes with the following error:
pygnssutils.version = '1.0.4'
Steps to reproduce the behaviour:
gnssserver --inport "/dev/ttyACM0"
(with the correct device)Expected Behaviour
For the gnssserver no to crash if it got malformed data, even though it is quite weird that is happened as the checksum is on.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: