Skip to content

Bloxter/Python GPS library fails with a "GPS object has no attribute 'Read' " #343

@jharris1993

Description

@jharris1993

When attempting to use the GPS code either from Bloxter or from within a Python program, the call to the GPS fails with a "GPS object has no attribute 'Read' "

Screenshot from within Bloxter:

Image

Corresponding Python code:

import easygopigo3 as easy
import time
import easygps

sensor_readings = None
gpg = easy.EasyGoPiGo3()
gps_sensor = easygps.GPS()
gps_sensor.read() # take an initial reading


# start
while True:
    print(gps_sensor.get_latitude_str())
    time.sleep(0.2)
    print(gps_sensor.get_longitude_str())
    time.sleep(0.2)
    print(gps_sensor.get_utc0_time())
    time.sleep(0.2)
    time.sleep(0.05) # slowdown

Resultant error thrown:

Python 3.7.3 (/usr/bin/python3)
>>> %cd /home/pi/Desktop
>>> %Run Read_GPS_from_Bloxter.py
Traceback (most recent call last):
  File "/home/pi/Desktop/Read_GPS_from_Bloxter.py", line 8, in <module>
    gps_sensor.read() # take an initial reading
AttributeError: 'GPS' object has no attribute 'read'
>>> 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions