Closed oasys closed 1 year ago
@oasys I'll take a look at it. I'm using the same version at our production and this problem does not occur.
Does the error show some file location where the problem shows up?
The problem is when you try to order by file size. The size of the file is not stored in the database, so ordering will fail.
@oasys Should I add the file size to the database, or forbid the ordering and etc. on it?
When you go to NETBOX/user/preferences/ and clear out the table preferences, you should see the plugin page without a problem.
https://stackoverflow.com/questions/52953586/filter-by-file-size-in-django-filefield
Ok, I cannot find how to disable ordering. So I guess I will add file size to the database table.
Clearing the sort preference does work around the issue, thanks.
I saw that #24 attempts to fix this in a more general way, but that fails for me with:
ModuleNotFoundError: No module named 'utilities.json'
Clearing the sort preference does work around the issue, thanks.
I saw that #24 attempts to fix this in a more general way, but that fails for me with:
ModuleNotFoundError: No module named 'utilities.json'
Could you provide some more details? Traceback etc. I'm using this new version in production, and it work fine.
@oasys it seems utilities.json
is a library created by NetBox.
https://github.com/netbox-community/netbox/blob/develop/netbox/utilities/json.py
So I don't know why your instance cannot be found it as a module.
Oh okay, i think I found the problem. You are using NetBox 3.3.9
but utilities.json was added at the latest version 3.4.3 I guess https://github.com/netbox-community/netbox/commit/af8bb0c4b9c0b8d6599f110f522bd1e598c40b88
And when I did a migration ( https://github.com/Kani999/netbox-attachments/pull/24/files#diff-a021e1288da10ed634e63b73cfae1a8b5b44908d8b74c404eca857982451326dR19 ) There was another line generated automatically by NetBox, which uses this.
Clicking on "Plugins" and "Attachments" (to load the
/plugins/netbox-attachments/netbox-attachments/
page) fails with an exception:Netbox-attachments version: 1.0.6
This is happening on our production instance (docker) as well as our dev server (VM installation). But, I cannot replicate the problem locally (docker). In all cases, I've restored the database from the production instance. I've changed the backend config (from S3 back to default/local) and it still fails. I've also upgraded Netbox 3.3.8 to 3.3.9.
Can you suggest where I might look to troubleshoot and isolate the cause?