Skip to content
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

Error while using a UBLOX module #5

Closed
eighthree opened this issue Apr 28, 2018 · 8 comments
Closed

Error while using a UBLOX module #5

eighthree opened this issue Apr 28, 2018 · 8 comments

Comments

@eighthree
Copy link

eighthree commented Apr 28, 2018

Was testing this unit on a Trinket M0 running Circuitpython 2.x.

When GPS is still locking on this error occurs:

Traceback (most recent call last):
  File "code.py", line 71, in <module>
  File "adafruit_gps.py", line 109, in update
  File "adafruit_gps.py", line 201, in _parse_gprmc
TypeError: can't convert NoneType to int

As soon as the GPS locks on the error disappears and things work properly.

@margaret
Copy link
Contributor

I am going to work on this (pycon sprints)

@tannewt
Copy link
Member

tannewt commented May 16, 2018

Fixed by #6!

@tannewt tannewt closed this as completed May 16, 2018
@Andon-A
Copy link

Andon-A commented Sep 11, 2018

I'm getting similar to the original issue here. Before the GPS is locked/warmed up/whatever terminology you want to use, I'm getting errors in update:

  File "adafruit_gps.py", line 112, in update
  File "adafruit_gps.py", line 206, in _parse_gprmc
TypeError: can't convert NoneType to int

However, I more often get this issue:

  File "main.py", line 76, in <module>
  File "adafruit_gps.py", line 102, in update
  File "adafruit_gps.py", line 143, in _parse_sentence
UnicodeError:

As with the original issue, once the device begins functioning, it rarely gives any errors.

A quick glance at the indicated code for the NoneType error shows that it looks like it's attempting to error check the time_utc after attempting the conversion to int. I've taken some pokes at working with this, but my device isn't cooperating and it's midnight.

@dhalbert
Copy link
Contributor

@Andon-A I've seen the UnicodeError before: I think I was getting garbage on the serial line, but I can't remember. Could you just print out the input and take a look at it?

Is this Adafruit's Ultimate GPS or some other module?

@Andon-A
Copy link

Andon-A commented Sep 12, 2018

@dhalbert I'll fiddle tomorrow to get it to print the input.

It's a uBlox NEO-5Q-0-002

@MBottinIUT
Copy link

Hi,

I just try to test a NEO-6M GPS module with CircuitPython on Itsy Bitsy M4 express board.
And when i put the simple test example into my main.py, I obtain the same TypeError like above.
The message is something like 'can't convert NoneType to int' (line 211 in '_parse_gprmc').

However, when I look at the oscilloscope, the signal is quite correct with an update every second.

I tried with Circuitpython v3.1.2 and v4.0.0 beta 5 and I've got the same results.

Does anyone fix it ?

Thanks a lot.

@dhalbert
Copy link
Contributor

dhalbert commented Mar 28, 2019

This seems more like an issue with the serial data coming from the GPS. If you create the GPS object with debug=True as the last argument, it will print out what it's getting from the GPS module before it tries to parse it. That will help a lot trying to debug this.

I encourage you to open a new issue rather than add to a closed one.

@MBottinIUT
Copy link

Thanks a lot for your answer.
I should have just tested my GPS info with a serial terminal. I would have noticed that the frames, if they were still present, remained empty of information.
In fact, I wasn't getting enough reception from the satellite signals where I was. I moved around a little bit and everything is now working perfectly.
Thank you again

evaherrada added a commit that referenced this issue May 16, 2019
Added ways to handle all sentences. Currently, only _parse_gpgll actually works
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants