You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "c:/Users/pkesb/test.py", line 25, in <module>
plt.plot(point.time, point.longitude)
File "C:\Users\pkesb\anaconda3\lib\site-packages\matplotlib\pyplot.py", line 2761, in plot
return gca().plot(
File "C:\Users\pkesb\anaconda3\lib\site-packages\matplotlib\axes\_axes.py", line 1647, in plot
lines = [*self._get_lines(*args, data=data, **kwargs)]
File "C:\Users\pkesb\anaconda3\lib\site-packages\matplotlib\axes\_base.py", line 216, in __call__
yield from self._plot_args(this, kwargs)
File "C:\Users\pkesb\anaconda3\lib\site-packages\matplotlib\axes\_base.py", line 337, in _plot_args
self.axes.xaxis.update_units(x)
File "C:\Users\pkesb\anaconda3\lib\site-packages\matplotlib\axis.py", line 1518, in update_units
self.set_units(default)
File "C:\Users\pkesb\anaconda3\lib\site-packages\matplotlib\axis.py", line 1587, in set_units
if u == self.units:
File "C:\Users\pkesb\anaconda3\lib\site-packages\gpxpy\gpxfield.py", line 75, in __eq__
return self.offset == other.offset # type: ignore
AttributeError: 'NoneType' object has no attribute 'offset'
The text was updated successfully, but these errors were encountered:
It seems to me, as a newcomer in gpxpy, there are problems related to SimpleTZ (such as issue #190). I am not sure what is the best way: mod of SimpleTZ to a fully functional one, use of built-in zoneinfo in python 3.9+ (which is backported to 3.6+), keep SimpleTZ as simple as possible, etc.
Another workaround without the mod of gpxpy is to replace tzinfo.
I ran into this error trying to plot points with matplotlib (see code below to repro).
I worked around it by modifying
SimpleTZ.__eq__
to do an isinstance check:Here is code to repro. This is with python 3.8.3, gpxpy 1.4.2 and matplotlib 3.2.2.
Stack trace:
The text was updated successfully, but these errors were encountered: