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
Import fails with a ValueError: Ambiguous content type back mapping dcim.location error:
nautobot@nautobot-test:~$ nautobot-server import_netbox --print-summary --dry-run --update-paths --bypass-data-validation --sitegroup-parent-always-region /tmp/netbox_data.json
Operations to perform:
Apply all migrations: admin, auth, circuits, contenttypes, database, dcim, django_celery_beat, django_celery_results, extras, ipam, sessions, silk, social_django, taggit, tenancy, users, virtualization
Running migrations:
No migrations to apply.
07:18:17.217 INFO nautobot.extras.utils :
Refreshed Job "System Jobs: Export Object List" from <ExportObjectList>
07:18:17.226 INFO nautobot.extras.utils :
Refreshed Job "System Jobs: Git Repository: Sync" from <GitRepositorySync>
07:18:17.234 INFO nautobot.extras.utils :
Refreshed Job "System Jobs: Git Repository: Dry-Run" from <GitRepositoryDryRun>
07:18:17.243 INFO nautobot.extras.utils :
Refreshed Job "System Jobs: Import Objects" from <ImportObjects>
Failed to create importer for extras.configcontext->locations
Traceback (most recent call last):
File "/opt/nautobot/bin/nautobot-server", line 8, in <module>
sys.exit(main())
File "/opt/nautobot/lib/python3.10/site-packages/nautobot/core/cli/__init__.py", line 286, in main
execute_from_command_line([sys.argv[0], *unparsed_args])
File "/opt/nautobot/lib/python3.10/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
utility.execute()
File "/opt/nautobot/lib/python3.10/site-packages/django/core/management/__init__.py", line 413, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/opt/nautobot/lib/python3.10/site-packages/django/core/management/base.py", line 354, in run_from_argv
self.execute(*args, **cmd_options)
File "/opt/nautobot/lib/python3.10/site-packages/django/core/management/base.py", line 398, in execute
output = self.handle(*args, **options)
File "/opt/nautobot/lib/python3.10/site-packages/nautobot_netbox_importer/management/commands/import_netbox.py", line 89, in handle
adapter.import_to_nautobot()
File "/opt/nautobot/lib/python3.10/site-packages/nautobot_netbox_importer/diffsync/adapters/netbox.py", line 97, in import_to_nautobot
self._atomic_import()
File "/usr/lib/python3.10/contextlib.py", line 79, in inner
return func(*args, **kwds)
File "/opt/nautobot/lib/python3.10/site-packages/nautobot_netbox_importer/diffsync/adapters/netbox.py", line 114, in _atomic_import
self.load()
File "/opt/nautobot/lib/python3.10/site-packages/nautobot_netbox_importer/diffsync/adapters/netbox.py", line 86, in load
self.import_data()
File "/opt/nautobot/lib/python3.10/site-packages/nautobot_netbox_importer/generator/source.py", line 329, in import_data
wrapper.create_importers()
File "/opt/nautobot/lib/python3.10/site-packages/nautobot_netbox_importer/generator/source.py", line 556, in create_importers
field.create_importer()
File "/opt/nautobot/lib/python3.10/site-packages/nautobot_netbox_importer/generator/source.py", line 869, in create_importer
self.set_importer(nautobot_name=self.definition)
File "/opt/nautobot/lib/python3.10/site-packages/nautobot_netbox_importer/generator/source.py", line 941, in set_importer
self.set_m2m_importer()
File "/opt/nautobot/lib/python3.10/site-packages/nautobot_netbox_importer/generator/source.py", line 1071, in set_m2m_importer
related_wrapper = self.wrapper.adapter.get_or_create_wrapper(self.nautobot.related_model)
File "/opt/nautobot/lib/python3.10/site-packages/nautobot_netbox_importer/generator/source.py", line 278, in get_or_create_wrapper
raise ValueError(f"Ambiguous content type back mapping {value}")
ValueError: Ambiguous content type back mapping dcim.location
I did notice that the options I have don't match the docs. There's no --field-mapping option, and --summary seems to have changed to --print-summary also --help didn't work but I put those down to documentation not having quite caught up with the updates.
Running nautobot-server import_netbox with no options gives me:
Environment
Expected Behavior
Import runs
Observed Behavior
Import fails with a
ValueError: Ambiguous content type back mapping dcim.location
error:Steps to Reproduce
python3 ./manage.py dumpdata -v 3 --traceback --format=json --exclude extras.ObjectChange --exclude extras.report --exclude extras.script --exclude django_rq --output=/tmp/netbox_data.json
pip3 install nautobot-netbox-importer
as usernautobot
from$NAUTOBOT_HOME
nautobot-server import_netbox --print-summary --dry-run --update-paths --bypass-data-validation --sitegroup-parent-always-region /tmp/netbox_data.json
I did notice that the options I have don't match the docs. There's no
--field-mapping
option, and--summary
seems to have changed to--print-summary
also--help
didn't work but I put those down to documentation not having quite caught up with the updates.Running
nautobot-server import_netbox
with no options gives me:Thanks.
The text was updated successfully, but these errors were encountered: