Skip to content
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

netbox-proxbox and netbox 3.4.x #72

Closed
wolfspyre opened this issue Dec 29, 2022 · 13 comments
Closed

netbox-proxbox and netbox 3.4.x #72

wolfspyre opened this issue Dec 29, 2022 · 13 comments

Comments

@wolfspyre
Copy link

Hi there!

First, Thank you for putting this together.

Have you tried netbox-proxbox with netbox3.4.x ?

with 3.3.x things seem to work as anticipated.

when attempting to enable the 0.0.5 version of the plugin in netbox3.4.x, netbox whines, moans, and ultimately fails:

netbox_1               | ImportError: cannot import name 'VirtualMachineStatusChoices' from 'virtualization.models' (/opt/netbox/netbox/virtualization/models/__init__.py)
netbox_1               | [ Use DB_WAIT_DEBUG=1 in netbox.env to print full traceback for errors here ]
netbox_1               | ImportError: cannot import name 'VirtualMachineStatusChoices' from 'virtualization.models' (/opt/netbox/netbox/virtualization/models/__init__.py)
netbox_1               | [ Use DB_WAIT_DEBUG=1 in netbox.env to print full traceback for errors here ]
netbox_1               | ImportError: cannot import name 'VirtualMachineStatusChoices' from 'virtualization.models' (/opt/netbox/netbox/virtualization/models/__init__.py)
netbox_1               | [ Use DB_WAIT_DEBUG=1 in netbox.env to print full traceback for errors here ]
netbox_1               | ImportError: cannot import name 'VirtualMachineStatusChoices' from 'virtualization.models' (/opt/netbox/netbox/virtualization/models/__init__.py)
netbox_1               | [ Use DB_WAIT_DEBUG=1 in netbox.env to print full traceback for errors here ]
netbox-docker_netbox_1 exited with code 143

This is running in Netbox-docker .. using netbox ver 3.4.1 and
netbox-proxmox version="0.0.5-beta1"

Figured you'd want to know!

@Chankster
Copy link
Contributor

In https://github.com/netdevopsbr/netbox-proxbox/blob/develop/netbox_proxbox/models.py#L15 change virtualization.models to virtualization.choices

@wolfspyre
Copy link
Author

Yep!

I can confirm that does, in fact, fix the problem....

@deniskonovalov64
Copy link

Good afternoon, I am installing this plugin on netbox 3.4.2 and faced with such an error:

Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/opt/netbox-3.4.2/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.2/venv/lib/python3.8/site-packages/django/core/management/__init__.py", line 420, in execute
    django.setup()
  File "/opt/netbox-3.4.2/venv/lib/python3.8/site-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/opt/netbox-3.4.2/venv/lib/python3.8/site-packages/django/apps/registry.py", line 116, in populate
    app_config.import_models()
  File "/opt/netbox-3.4.2/venv/lib/python3.8/site-packages/django/apps/config.py", line 269, in import_models
    self.models_module = import_module(models_module_name)
  File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 848, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/opt/netbox-3.4.2/venv/lib/python3.8/site-packages/netbox_proxbox/models.py", line 15, in <module>
    from virtualization.models import VirtualMachineStatusChoices
ImportError: cannot import name 'VirtualMachineStatusChoices' from 'virtualization.models' (/opt/netbox-3.4.2/netbox/virtualization/models/__init__.py)

installed via pip3
What can be done in this case? Thank you in advance

@deniskonovalov64
Copy link

Or I don't understand something

@deniskonovalov64
Copy link

I understood where it was necessary to fix the config. Thanks)

@Kris33
Copy link

Kris33 commented Jan 23, 2023

What did you to to fix? I have the same problem
ImportError: cannot import name 'VirtualMachineStatusChoices' from 'virtualization.models' (/opt/netbox-3.4.2/netbox/virtualization/models/init.py)

@Chankster
Copy link
Contributor

@Kris33 as noted above:

In https://github.com/netdevopsbr/netbox-proxbox/blob/develop/netbox_proxbox/models.py#L15 change virtualization.models to virtualization.choices

@Kris33
Copy link

Kris33 commented Jan 23, 2023

Done. Yet, I still have the error.

@Chankster
Copy link
Contributor

Can you post your full traceback?

@Kris33
Copy link

Kris33 commented Jan 23, 2023

FInally had it working after upgrading to netbox 3.4.3.

Yet I still have this nagging erro after clicking on Full update:

Server Error

There was a problem with your request. Please contact an administrator.

The complete exception is provided below:

<class 'AttributeError'>

object has no attribute "slug"

Python version: 3.9.13
NetBox version: 3.4.3

Can't seems to be able to get rid of it.

Proxmox version is 7.3-4

@Chankster
Copy link
Contributor

Will still need a full traceback.

@Kris33
Copy link

Kris33 commented Jan 23, 2023

how do I generate that ? I have no more error

@JouanDeag
Copy link

See issue #59
This has already been reported

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants