pyunifi icon indicating copy to clipboard operation
pyunifi copied to clipboard

switch_port_power_off error

Open caco3 opened this issue 3 years ago • 3 comments

switch_port_power_off or switch_port_power_on will fail: TypeError: list indices must be integers or slices, not dict.

I fixed it with replacing for i in overrides: with for i in range(len(overrides)): in _switch_port_power().

caco3 avatar Sep 26 '21 20:09 caco3

Is this replaced in the source code ? I did pip install pyunifi and got the error.

marc-odp avatar Feb 16 '22 14:02 marc-odp

@marc-odp I don't think so, I never did a Pull Request and nobody else cared about this.

caco3 avatar Feb 16 '22 20:02 caco3

I think one solution to this issue is in discussion in Pull Requests : https://github.com/finish06/pyunifi/pull/70#issue-1096583226 However it is not yet in the Code.

marc-odp avatar Feb 16 '22 22:02 marc-odp