You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):f-user-group) ✗ python manage.py loaddata ../../netbox-demo-data/netbox-demo-v3.4.json git:(feat/10600-cf-user-group|●1✚8
File "/home/asaharan/PycharmProjects/netbox/venv/lib/python3.10/site-packages/django/db/models/fields/related_descriptors.py", line 189, in __get__
rel_obj = self.field.get_cached_value(instance)
File "/home/asaharan/PycharmProjects/netbox/venv/lib/python3.10/site-packages/django/db/models/fields/mixins.py", line 15, in get_cached_value
return instance._state.fields_cache[cache_name]
KeyError: 'rack'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/asaharan/PycharmProjects/netbox-patches/netbox/manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/home/asaharan/PycharmProjects/netbox/venv/lib/python3.10/site-packages/django/core/management/__init__.py", line 446, in execute_from_command_line
utility.execute()
File "/home/asaharan/PycharmProjects/netbox/venv/lib/python3.10/site-packages/django/core/management/__init__.py", line 440, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/asaharan/PycharmProjects/netbox/venv/lib/python3.10/site-packages/django/core/management/base.py", line 402, in run_from_argv
self.execute(*args, **cmd_options)
File "/home/asaharan/PycharmProjects/netbox/venv/lib/python3.10/site-packages/django/core/management/base.py", line 448, in execute
output = self.handle(*args, **options)
File "/home/asaharan/PycharmProjects/netbox/venv/lib/python3.10/site-packages/django/core/management/commands/loaddata.py", line 102, in handle
self.loaddata(fixture_labels)
File "/home/asaharan/PycharmProjects/netbox/venv/lib/python3.10/site-packages/django/core/management/commands/loaddata.py", line 163, in loaddata
self.load_label(fixture_label)
File "/home/asaharan/PycharmProjects/netbox/venv/lib/python3.10/site-packages/django/core/management/commands/loaddata.py", line 253, in load_label
if self.save_obj(obj):
File "/home/asaharan/PycharmProjects/netbox/venv/lib/python3.10/site-packages/django/core/management/commands/loaddata.py", line 209, in save_obj
obj.save(using=self.using)
File "/home/asaharan/PycharmProjects/netbox/venv/lib/python3.10/site-packages/django/core/serializers/base.py", line 288, in save
models.Model.save_base(self.object, using=using, raw=True, **kwargs)
File "/home/asaharan/PycharmProjects/netbox/venv/lib/python3.10/site-packages/django/db/models/base.py", line 878, in save_base
post_save.send(
File "/home/asaharan/PycharmProjects/netbox/venv/lib/python3.10/site-packages/django/dispatch/dispatcher.py", line 176, in send
return [
File "/home/asaharan/PycharmProjects/netbox/venv/lib/python3.10/site-packages/django/dispatch/dispatcher.py", line 177, in <listcomp>
(receiver, receiver(signal=self, sender=sender, **named))
File "/home/asaharan/PycharmProjects/netbox-patches/netbox/dcim/signals.py", line 54, in assign_virtualchassis_master
master.save()
File "/home/asaharan/PycharmProjects/netbox-patches/netbox/dcim/models/devices.py", line 805, in save
if self.rack and self.rack.location:
File "/home/asaharan/PycharmProjects/netbox/venv/lib/python3.10/site-packages/django/db/models/fields/related_descriptors.py", line 207, in __get__
rel_obj = self.get_object(instance)
File "/home/asaharan/PycharmProjects/netbox/venv/lib/python3.10/site-packages/django/db/models/fields/related_descriptors.py", line 170, in get_object
return qs.get(self.field.get_reverse_related_filter(instance))
File "/home/asaharan/PycharmProjects/netbox/venv/lib/python3.10/site-packages/django/db/models/query.py", line 650, in get
raise self.model.DoesNotExist(
dcim.models.racks.Rack.DoesNotExist: Problem installing fixture '/home/asaharan/PycharmProjects/netbox-patches/netbox/../../netbox-demo-data/netbox-demo-v3.4.json': Rack matching query does not exist.
The text was updated successfully, but these errors were encountered:
This was triggered by this change in NetBox. It turns out that the devices are being imported before the racks, so the call to save() on the device instance is raising a DoesNotExist exception.
To fix this properly, we'll need to change the order in which the models are exported when generating the demo data.
NetBox version
v3.4.7
Python version
3.10
Steps to Reproduce
Install a fresh instance and load the 3.4 demo data from https://github.com/netbox-community/netbox-demo-data/blob/master/netbox-demo-v3.4.json
Expected Behavior
The data is loaded successfully
Observed Behavior
This is caused by commit at netbox-community/netbox@2883fa1
The text was updated successfully, but these errors were encountered: