-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError thrown at some PDU devices #10236
Comments
I'm afraid that's not going to be sufficient to reproduce the reported behavior. Please try to determine steps that someone else can follow to reliably reproduce the issue.
This indicates that |
Ok, I suspected that. I will see what I can do. I may need some time to figure out how to reproduce this. |
I'm curious what the value of that field is for the affected power feed. Can you inspect it using the shell? (Grab the numeric ID of the feed first; in the example below it's
|
I've checked the PowerFeed but it seems that it is not a string:
So I've tried something other and played around with value "allocated draw" of the pdu's power port.
In both cases I can not recognize any string values. I hope this information is helpful somehow. |
@jeremystretch - We hit this bug with three phase power feeds. It seems that this line has a bug, netbox/netbox/templates/dcim/device.html Line 232 in 385a0f9
netbox/netbox/templates/dcim/rack.html Line 176 in 385a0f9
netbox/netbox/templates/dcim/powerfeed.html Lines 44 to 53 in 385a0f9
We monkey patched this with ugly solution:
|
@jaylik Thank's for your monkey patch. I tried your device.html template patch. Now affected PDUs displayed properly without error page (I didn't check it with all affected PDUs, but checked two of them). What I also tried without patching something: If I connect the power port of an PDU with a three-phase power feed, problem appears. Now if edit the power feed and switch to a single-phase type, the PDU is displayed without error page. As @jaylik already said, it seems that this problem appears at three-phase power feeds. What I can say, we mainly use three-phase feeds but I don't have this bug with all of our three-phase feeded PDUs. |
I missed the fact, that our non-affected PDUs have a manually set allocated draw. If deleting the allocated draw of PDU power port, the exception page is present. |
@baschdello do you have a repro scenario for this? I tried using three-phase power feed and wasn't able to get it to repro. A step-by-step repro would be greatly appreciated. |
I will try this on monday with a fresh installation of v3.3.0 and give feedback. |
I've reproduced this issue with a fresh installation of v3.3.0. Here are steps to reproduce:
Best regards |
I don't think #10961 fully fixed the issue. Here I think the proper fix would be to change it to use There are also two other locations where netbox/netbox/templates/dcim/interface.html Line 213 in b1da374
netbox/netbox/templates/dcim/rack.html Line 176 in b1da374
|
NetBox version
v3.3.0
Python version
3.9
Steps to Reproduce
Expected Behavior
I expect that the pdu device is displayed.
Observed Behavior
An error page with "TypeError" is thrown. Not every pdu is affected although of same device type.
If deleting the cable of an affected pdu to the power feed, the pdu device is opened correctly. If I create the cable again, the type error page is present instead of the device page.
With option "DEBUG = True" in configuration.py the type error page displays some helpful information (attached at bottom). I think there is something wrong at the power utilization graph because of type mismatch.
The text was updated successfully, but these errors were encountered: