Skip to content

when verbose, print /dev/ files that are being attempted #2

@gmabey

Description

@gmabey

Hello! this looks like a pretty simple but extremely useful helper for those of us trying to get started using pyedbg!

My trouble is that I'm struggling to figure out which device file I need to change permissions on in order to get pykitinfo to succeed. Would you consider adding a bit more info to the -v debug mode that informs the user which devices it's trying to access? I have a PIC Kit 4 attached, and I'm getting this output:

glen@celeron:~$ pykitinfo -v debug
Looking for Microchip kits...
pykitinfo.pykitinfo - DEBUG - Looking for xEDBG kits
pykitinfo.pykitinfo - DEBUG - Looking for PKoB/PICkit 3 kits
pykitinfo.gen4_detect - DEBUG - Looking for Gen4 kits
pykitinfo.pykitinfo_cli - ERROR - Operation failed with ValueError: The device has no langid (permission issue, no string descriptors supported or device error)
pykitinfo.pykitinfo_cli - DEBUG - The device has no langid (permission issue, no string descriptors supported or device error)
Traceback (most recent call last):
  File "/home/glen/.local/lib/python3.10/site-packages/pykitinfo/pykitinfo_cli.py", line 131, in main
    return pykitinfo.pykitinfo(arguments)
  File "/home/glen/.local/lib/python3.10/site-packages/pykitinfo/pykitinfo.py", line 38, in pykitinfo
    kit_list = detect_all_kits()
  File "/home/glen/.local/lib/python3.10/site-packages/pykitinfo/pykitinfo.py", line 65, in detect_all_kits
    kit_list += detect_gen4_tools()
  File "/home/glen/.local/lib/python3.10/site-packages/pykitinfo/gen4_detect.py", line 116, in detect_gen4_tools
    tools = list_gen4_libusb_tools()
  File "/home/glen/.local/lib/python3.10/site-packages/pykitinfo/gen4_detect.py", line 72, in list_gen4_libusb_tools
    serial_number = device.serial_number
  File "/home/glen/.local/lib/python3.10/site-packages/usb/core.py", line 864, in serial_number
    self._serial_number = util.get_string(self, self.iSerialNumber)
  File "/home/glen/.local/lib/python3.10/site-packages/usb/util.py", line 313, in get_string
    raise ValueError("The device has no langid"
ValueError: The device has no langid (permission issue, no string descriptors supported or device error)

Thank you!
Glen

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions