vivosmart4 .gcd parsing error #37

Closed
opened 2023-03-19 08:38:18 +00:00 by gy8qZ6 · 1 comment
gy8qZ6 commented 2023-03-19 08:38:18 +00:00 (Migrated from github.com)

./gcdstruct.py --verbose vivosmart4_480.gcd
Opening vivosmart4_480.gcd
#000: TLV Type 0001 at 0x8, 1 Byte - Checksum rectifier
#001: TLV Type 0002 at 0xd, 21 Bytes - Padding
#002: TLV Type 0003 at 0x26, 9 Bytes - Part number?
#003: TLV Type 0005 at 0x33, 55 Bytes - Copyright notice
#004: TLV Type 0001 at 0x6e, 1 Byte - Checksum rectifier
#005: TLV Type 0002 at 0x73, 3977 Bytes - Padding
#006: TLV Type 0001 at 0x1000, 1 Byte - Checksum rectifier
#007: TLV Type 0006 at 0x1005, 14 Bytes - Block Type 7 format definition

  • Field list: 000b 000a 100a 2015 1009 100d 5003
    Traceback (most recent call last):
    File "/Users/admincr/Garmin_Firmware/gcd-parser/vivosmart4_test/../gcdstruct.py", line 26, in
    gcd.print_struct_full()
    File "/Users/admincr/Garmin_Firmware/gcd-parser/grmn/gcd.py", line 104, in print_struct_full
    print("#{:03d}: {}".format(i, tlv))
    File "/Users/admincr/Garmin_Firmware/gcd-parser/grmn/tlv.py", line 323, in str
    txt += "\n - Field {:d} ({:04x}): {:>20}: 0x{:04x} / {:d} ({})".format(i+1, fid, fdesc, v, v, devices.get_name(v, 0, RED + "Unknown device" + RESET))
    File "/Users/admincr/Garmin_Firmware/gcd-parser/grmn/devices.py", line 17, in get_name
    if subid.isnumeric():
    AttributeError: 'int' object has no attribute 'isnumeric'
./gcdstruct.py --verbose vivosmart4_480.gcd Opening vivosmart4_480.gcd #000: TLV Type 0001 at 0x8, 1 Byte - Checksum rectifier #001: TLV Type 0002 at 0xd, 21 Bytes - Padding #002: TLV Type 0003 at 0x26, 9 Bytes - Part number? #003: TLV Type 0005 at 0x33, 55 Bytes - Copyright notice #004: TLV Type 0001 at 0x6e, 1 Byte - Checksum rectifier #005: TLV Type 0002 at 0x73, 3977 Bytes - Padding #006: TLV Type 0001 at 0x1000, 1 Byte - Checksum rectifier #007: TLV Type 0006 at 0x1005, 14 Bytes - Block Type 7 format definition - Field list: 000b 000a 100a 2015 1009 100d 5003 Traceback (most recent call last): File "/Users/admincr/Garmin_Firmware/gcd-parser/vivosmart4_test/../gcdstruct.py", line 26, in <module> gcd.print_struct_full() File "/Users/admincr/Garmin_Firmware/gcd-parser/grmn/gcd.py", line 104, in print_struct_full print("#{:03d}: {}".format(i, tlv)) File "/Users/admincr/Garmin_Firmware/gcd-parser/grmn/tlv.py", line 323, in __str__ txt += "\n - Field {:d} ({:04x}): {:>20}: 0x{:04x} / {:d} ({})".format(i+1, fid, fdesc, v, v, devices.get_name(v, 0, RED + "Unknown device" + RESET)) File "/Users/admincr/Garmin_Firmware/gcd-parser/grmn/devices.py", line 17, in get_name if subid.isnumeric(): AttributeError: 'int' object has no attribute 'isnumeric'
gy8qZ6 commented 2023-03-19 11:07:49 +00:00 (Migrated from github.com)

Adding quotes, so that it's
devices.get_name(v, "0", RED + "Unknown device" + RESET)
in tlv.py, line 323 works as a workaround

Adding quotes, so that it's `devices.get_name(v, "0", RED + "Unknown device" + RESET)` in tlv.py, line 323 works as a workaround
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mbirth/gcd-parser#37
No description provided.