USBToolBox / tool

the USBToolBox tool
MIT License
936 stars 62 forks source link

TypeError: 'NoneType' object is not subscriptable #16

Closed adrianlungu closed 3 years ago

adrianlungu commented 3 years ago

Describe the bug Ran Windows.exe and this is what it ran into while trying to do Port Discovery:

Getting controllers...
Traceback (most recent call last):
  File "Windows.py", line 149, in <module>
  File "Windows.py", line 32, in __init__
  File "base.py", line 50, in __init__
  File "base.py", line 680, in monu
  File "utils.py", line 204, in start
  File "utils.py", line 188, in select
  File "base.py", line 222, in discover_ports
  File "Windows.py", line 111, in get_controllers
  File "Windows.py", line 35, in update_usbdump
  File "usbdump.py", line 214, in get_controllers
TypeError: 'NoneType' object is not subscriptable
[16964] Failed to execute script Windows

Debugging information debug_dump_01.zip

Hardware:

dhinakg commented 3 years ago

How many USB controllers do you have in your system? You can check in Device Manager > Universal Serial Bus controllers. Make sure you ignore the composite devices and root hubs and only look at host controllers.

dhinakg commented 3 years ago

I've released 0.0.9 which hopefully fixes this, please test.

adrianlungu commented 3 years ago

Seems to be working now! Thanks @dhinakg

Gonna proceed further with setting up the usb ports and see how it goes.

adrianlungu commented 3 years ago

Ok, I've setup the kext, loaded it in OpenCore but it seems for some reason some USB ports which I've mapped are not recognized by Catalina. 🤔

Should I open another issue for this and describe it in more details ?

Edit: just re-did the discovery and kext and it seems something may be wrong either with my board or with the companion discovery; I disabled some companions but it seems they may have been incorrectly tied.

I have a front panel for USB that goes into the motherboard, and I disabled those 2 ports alongside 1 usb 3.2 port on the back; and for some reason, another usb 3 port on the back doesn't work with usb 3 devices but works with 2 while the one next to it works with usb 3 devices. Very weird.

In any case, thanks you very much for the tool, hopefully this process gets easier in time. If you put up a contribution banner or something, would love to buy you at least a coffee!

dhinakg commented 3 years ago

Hmm - your borkiness is probably your mobo, tbh. Either that or you're missing drivers, as I saw a controller in your debug log but it was completely devoid of any information. There wasn't any info from WMI either, so I'm guessing it was either botched or you don't have drivers installed for it. This issue with companions could happen if some of the companions are on the botched controller.

adrianlungu commented 3 years ago

That makes sense. I'll close the issue since it has been resolved, thanks again!