-
-
Notifications
You must be signed in to change notification settings - Fork 261
Open
Description
When connecting to the proxy mode on a m3 max, I got an error like "type int is not subscriptable" on line 22 of proxyclient/m1n1/hw/pmu.py where it handles errors and resets the error counter. To bypass this, I checked for type, and if it's an int, I just use it directly without subscripting it. This seemed to work, but I have no idea if this is correct.
This is my hacky bypass:
diff --git a/proxyclient/m1n1/hw/pmu.py b/proxyclient/m1n1/hw/pmu.py
index b545df4..d416b21 100644
--- a/proxyclient/m1n1/hw/pmu.py
+++ b/proxyclient/m1n1/hw/pmu.py
@@ -21,8 +21,14 @@ class PMU:
def reset_panic_counter(self):
if self.primary:
- leg_scrpad = self.node.info_leg__scrpad[0]
- self.spmi.write8(self.reg, leg_scrpad + 2, 0) # error counts
+ print(f"type is {type(self.node.info_leg__scrpad)}")
+ if isinstance(self.node.info_leg__scrpad, int):
+ print("Note: type int is not subscriptable")
+ leg_scrpad = self.node.info_leg__scrpad
+ self.spmi.write8(self.reg, leg_scrpad + 2, 0) # maybe still error counts?
+ else:
+ leg_scrpad = self.node.info_leg__scrpad[0]
+ self.spmi.write8(self.reg, leg_scrpad + 2, 0) # error counts
@staticmethod
def find_primary_pmu(adt):
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels