Good afternoon. Using your library, I wrote a small utility for exchanging data with GPS devices. Problem: I can't send the track, it gives an error : C:\Users\AME>pygarmin -p COM6 put-tracks -t gpx C:\Users\AME\Desktop\трек.gpx
C:\Users\AME\AppData\Local\Programs\Python\Python312\Lib\site-packages\pygarmin\gpx.py:1040: FutureWarning: The behavior of this method will change in future versions. Use specific 'len(elem)' or 'elem is not None' test instead.
if extension:
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "C:\Users\AME\AppData\Local\Programs\Python\Python312\Scripts\pygarmin.exe__main__.py", line 7, in
File "C:\Users\AME\AppData\Local\Programs\Python\Python312\Lib\site-packages\pygarmin\pygarmin.py", line 1522, in main
command(args)
File "C:\Users\AME\AppData\Local\Programs\Python\Python312\Lib\site-packages\pygarmin\pygarmin.py", line 459, in put_tracks
gpx = GPX.GarminTracks(args.filename, datatypes)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\AME\AppData\Local\Programs\Python\Python312\Lib\site-packages\pygarmin\gpx.py", line 1017, in init
self.tracks = self.gpx_to_tracks(xml_or_file, datatypes)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\AME\AppData\Local\Programs\Python\Python312\Lib\site-packages\pygarmin\gpx.py", line 1061, in gpx_to_tracks
trk_point.set_color(color)
^^^^^^^^^^^^^^^^^^^
AttributeError: 'D302' object has no attribute 'set_color'
What can be done?
C:\Users\AME>pygarmin -p COM6 put-tracks -t gpx C:\Users\AME\Desktop\после.gpx
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "C:\Users\AME\AppData\Local\Programs\Python\Python312\Scripts\pygarmin.exe__main.py", line 7, in
File "C:\Users\AME\AppData\Local\Programs\Python\Python312\Lib\site-packages\pygarmin\pygarmin.py", line 1520, in main
app = Pygarmin(args.port)
^^^^^^^^^^^^^^^^^^^
File "C:\Users\AME\AppData\Local\Programs\Python\Python312\Lib\site-packages\pygarmin\pygarmin.py", line 236, in init__
self.gps = self.get_gps(self.port)
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\AME\AppData\Local\Programs\Python\Python312\Lib\site-packages\pygarmin\pygarmin.py", line 242, in get_gps
return mod_garmin.Garmin(phys)
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\AME\AppData\Local\Programs\Python\Python312\Lib\site-packages\pygarmin\garmin.py", line 144, in init
self.product_data = self.product_data_protocol.get_product_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\AME\AppData\Local\Programs\Python\Python312\Lib\site-packages\pygarmin\protocol.py", line 174, in get_product_data
packet = self.link.expect_packet(self.link.pid_product_data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\AME\AppData\Local\Programs\Python\Python312\Lib\site-packages\pygarmin\protocol.py", line 52, in expect_packet
raise mod_error.ProtocolError(f"Expected {pid:3}, got {packet['id']:3}")
pygarmin.error.ProtocolError: 'Expected 255, got 249'
Good afternoon. Using your library, I wrote a small utility for exchanging data with GPS devices. Problem: I can't send the track, it gives an error : C:\Users\AME>pygarmin -p COM6 put-tracks -t gpx C:\Users\AME\Desktop\трек.gpx C:\Users\AME\AppData\Local\Programs\Python\Python312\Lib\site-packages\pygarmin\gpx.py:1040: FutureWarning: The behavior of this method will change in future versions. Use specific 'len(elem)' or 'elem is not None' test instead. if extension: Traceback (most recent call last): File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "C:\Users\AME\AppData\Local\Programs\Python\Python312\Scripts\pygarmin.exe__main__.py", line 7, in
File "C:\Users\AME\AppData\Local\Programs\Python\Python312\Lib\site-packages\pygarmin\pygarmin.py", line 1522, in main
command(args)
File "C:\Users\AME\AppData\Local\Programs\Python\Python312\Lib\site-packages\pygarmin\pygarmin.py", line 459, in put_tracks
gpx = GPX.GarminTracks(args.filename, datatypes)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\AME\AppData\Local\Programs\Python\Python312\Lib\site-packages\pygarmin\gpx.py", line 1017, in init
self.tracks = self.gpx_to_tracks(xml_or_file, datatypes)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\AME\AppData\Local\Programs\Python\Python312\Lib\site-packages\pygarmin\gpx.py", line 1061, in gpx_to_tracks
trk_point.set_color(color)
^^^^^^^^^^^^^^^^^^^
AttributeError: 'D302' object has no attribute 'set_color'
What can be done?