iDebugAll/nextbox-ui-plugin

Problem with the version Netbox 3.2x

marcucci-DAE opened this issue · 6 comments

Hi all,
in the previous version I used this plugin without problem, but after the upgrade at 3.2 version , when I enable the plugin in the configuration.py, and I try to make a python manage.py migrate , I receive the following error.

Your models in app(s): 'nextbox_ui_plugin' have changes that are not yet reflected in a migration, and so won't be applied.
Run 'manage.py makemigrations' to make new migrations, and then re-run 'manage.py migrate' to apply them.

When I try to use the plugin I receive the following error.

image

Someone have any idea???

Regards

I have the same problem but unfortunately no solution.

I modified the configuration.py with :

# This parameter serves as a safeguard to prevent some potentially dangerous behavior, such as generating new database schema migrations. 
# Set this to True only if you are actively developing the NetBox code base.

DEVELOPER = True

after that i was able to succesfully execute :

python3 manage.py makemigrations
python3 manage.py migrate

This resolved the issue although i kept the notification.

This looks like a duplicate of #98 that I raised for all plugins when it was released.

Just seems like more detail.

Is this issue not resolved in V0.10.0 ?

@pdenessen : Unfortunately, I ran into that issue with 0.11.0 (not published on github, but available at https://pypi.org/project/nextbox-ui-plugin/#description . Everything was fine on my end until that upgrade (was running 0.9.2) :( Running makemigrations didnt cut it...

python3 manage.py makemigrations
Migrations for 'nextbox_ui_plugin':
  /opt/netbox-3.4.3/venv/lib/python3.8/site-packages/nextbox_ui_plugin/migrations/0002_alter_savedtopology_id.py
    - Alter field id on savedtopology
Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/opt/netbox-3.4.3/venv/lib/python3.8/site-packages/django/core/management/__init__.py", line 446, in execute_from_command_line
    utility.execute()
  File "/opt/netbox-3.4.3/venv/lib/python3.8/site-packages/django/core/management/__init__.py", line 440, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/opt/netbox-3.4.3/venv/lib/python3.8/site-packages/django/core/management/base.py", line 402, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/opt/netbox-3.4.3/venv/lib/python3.8/site-packages/django/core/management/base.py", line 448, in execute
    output = self.handle(*args, **options)
  File "/opt/netbox-3.4.3/netbox/utilities/management/commands/makemigrations.py", line 28, in handle
    super().handle(*args, **kwargs)
  File "/opt/netbox-3.4.3/venv/lib/python3.8/site-packages/django/core/management/base.py", line 96, in wrapped
    res = handle_func(*args, **kwargs)
  File "/opt/netbox-3.4.3/venv/lib/python3.8/site-packages/django/core/management/commands/makemigrations.py", line 239, in handle
    self.write_migration_files(changes)
  File "/opt/netbox-3.4.3/venv/lib/python3.8/site-packages/django/core/management/commands/makemigrations.py", line 279, in write_migration_files
    with open(writer.path, "w", encoding="utf-8") as fh:
PermissionError: [Errno 13] Permission denied: '/opt/netbox-3.4.3/venv/lib/python3.8/site-packages/nextbox_ui_plugin/migrations/0002_alter_savedtopology_id.py'

@iDebugAll , any clue where this comes from?

just realized the issue might come before migration... I had to issue the install command as sudo because I got the following error when I first tried:

(venv) user@hostname:~/nextbox-ui-plugin$ pip3 install .
Processing /home/user/nextbox-ui-plugin
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: nextbox-ui-plugin
  Building wheel for nextbox-ui-plugin (setup.py) ... done
  Created wheel for nextbox-ui-plugin: filename=nextbox_ui_plugin-0.9.2-py3-none-any.whl size=1256041 sha256=171529da1b5064d9721bb92afa33c07106367b1e0745472777c668e99a2a2e7f
  Stored in directory: /home/user/.cache/pip/wheels/94/79/7a/13baa17b44fcba6273af7d4280e7e6aa56169206f1957722d0
Successfully built nextbox-ui-plugin
Installing collected packages: nextbox-ui-plugin
  Attempting uninstall: nextbox-ui-plugin
    Found existing installation: nextbox-ui-plugin 0.9.2
    Uninstalling nextbox-ui-plugin-0.9.2:
**ERROR: Could not install packages due to an OSError: [Errno 13] Permission denied: 'RECORD'
Check the permissions.**