Replies: 2 comments 4 replies
-
Already raised as #12842 (for reports) and #12766 (for scripts). Reports were actually more broken than this - they caused the whole UI to raise an exception - and the pull which closed #12842 fixed that. But now reports and scripts are both the same, in that they just say "Could not load" without any more info. For now, my workaround is to add these lines temporarily to the top of the script or report:
and then run from the command line:
That should show you the error which prevents the script loading. When you've fixed it, comment out or remove the temporary lines. |
Beta Was this translation helpful? Give feedback.
-
How do you see the error message in the log? I've checked
|
Beta Was this translation helpful? Give feedback.
-
If you have e.g. accidentally uploaded a report without test methods, the entire reports page is unusable, due to not giving you the possibility of removing the erroneous report without logging in to the server running Netbox, etc. It would be better, if you could simply remove this report with one click.
For example, you could do it like that:
Another issue is, that during the upload of a report with e.g. syntax errors, you just get "Could not load reports from b.py", albeit in the log there is already
Unable to load report module b.py, exception: 'break' outside loop (b.py, line 6)
for e.g. thisb.py
:It would be useful to propagate this error to the UI. For example like this:
The code is here for playing around: develop...JCWasmx86:netbox:develop
Nothing really concrete, so I created a discussion, hope that's the correct thing to do
Beta Was this translation helpful? Give feedback.
All reactions