corpnewt / USBMap

Python script for mapping USB ports in macOS and creating a custom injector kext.
MIT License
1.03k stars 88 forks source link

KeyError python error when running on macOS Mojave #50

Open briantully opened 9 months ago

briantully commented 9 months ago

I'm trying to run the command, but keep getting the following error:

Current Controllers:

 -    PXS4@0 @ _SB.PCI0.IOU2.I2PS.PPB4.PXS4
  \-> RHUB @ _SB.PCI0.IOU2.I2PS.PPB4.PXS4.RHUB
 -   UHC4@1A @ _SB.PCI0.UHC4
 - UHC5@1A,1 @ _SB.PCI0.UHC5
 - UHC6@1A,2 @ _SB.PCI0.UHC6
 - EHC2@1A,7 @ _SB.PCI0.EHC2 (Needs Rename)
Traceback (most recent call last):
  File "/Users/btully/Sites/USBMap/./USBMap.py", line 1566, in <module>
    u.main()
  File "/Users/btully/Sites/USBMap/./USBMap.py", line 1488, in main
    if not "XHCI" in self.connected_controllers[x]["type"]: continue # Only check XHCI for RHUB paths
KeyError: 'EHC2@fa000000'

Is this a known issue? Any idea how to debug this? Is there a specific version of python needed? I didn't see a requirements.txt or any mention of system requirements.

There is also mention of running commands from "USBMap's main menu" -- but how does one view the main menu?

corpnewt commented 9 months ago

Could you dump your ioreg.txt via the following command in terminal and upload it here?:

ioreg -lw0 > ~/Desktop/ioreg.txt

-CorpNewt

briantully commented 9 months ago

ioreg.txt

Sure thing! Thanks a bunch :)

corpnewt commented 9 months ago

As of this commit that issue should be fixed. Please let me know if you run into others.

-CorpNewt

briantully commented 9 months ago

Thank you! Worked like a charm :)

On Wed, Nov 22, 2023 at 8:06 PM CorpNewt @.***> wrote:

As of this commit https://github.com/corpnewt/USBMap/commit/871ae6d69c8d44bbb0788f6959638b3fd451858e that issue should be fixed. Please let me know if you run into others.

-CorpNewt

— Reply to this email directly, view it on GitHub https://github.com/corpnewt/USBMap/issues/50#issuecomment-1823711412, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAUDEIKDTDYVHCWWDEK6YDYF2OSDAVCNFSM6AAAAAA7W3HTUSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRTG4YTCNBRGI . You are receiving this because you authored the thread.Message ID: @.***>