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

Question: What can be done? #15

Open
R1BGW opened this issue Oct 11, 2024 · 1 comment
Open

Question: What can be done? #15

R1BGW opened this issue Oct 11, 2024 · 1 comment

Comments

@R1BGW
Copy link

R1BGW commented Oct 11, 2024

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?

@R1BGW
Copy link
Author

R1BGW commented Oct 18, 2024

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'

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

1 participant