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

error": "duplicate key value violates unique constraint " #125

Closed
derekschartung opened this issue Mar 7, 2024 · 1 comment
Closed

error": "duplicate key value violates unique constraint " #125

derekschartung opened this issue Mar 7, 2024 · 1 comment

Comments

@derekschartung
Copy link

Fresh install of Netbox 3.7.3. New DB. Getting this error when running import.

Package Installed https://github.com/netbox-community/devicetype-library.git No Vendors Specified, Gathering All Device-Types 121 Vendors Found 2927 Device-Types Found {"error": "duplicate key value violates unique constraint \"dcim_manufacturer_slug_key\"\nDETAIL: Key (slug)=(watchguard) already exists.", "exception": "IntegrityError", "netbox_version": "3.7.3", "python_version": "3.11.4"} {"manufacturer":["Related object not found using the provided attributes: {'name': 'HPE', 'slug': 'hpe'}"]} Traceback (most recent call last): File "/app/nb-dt-import.py", line 853, in <module> main() File "/app/nb-dt-import.py", line 826, in main createDeviceTypes(deviceTypes, nb) File "/app/nb-dt-import.py", line 680, in createDeviceTypes dt.id, nb) UnboundLocalError: local variable 'dt' referenced before assignment

@netravnen
Copy link

          https://github.com/netbox-community/devicetype-library/pull/1978 fixes this issue.

Originally posted by @gurubert in #123 (comment)

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

No branches or pull requests

3 participants