-
Notifications
You must be signed in to change notification settings - Fork 10
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
Import not successful #2
Comments
I've got the same problem, netbox v3.0.3 |
What data package are you using for import? |
Instructions not working for netbox VERSION = '3.1.7' |
I'm sharing this for anyone else who has the same issue. I had the same error (except the line and character were different) when importing the v3.4 demo data into a new install of netbox docker. I fixed it by opening the netbox-demo-v3.4.json file in VS Code and using the fix-json extension to correct it. I didn't have the time to find out exactly what was wrong with the original format. |
Are you sure that vscode is not doing something funny to the JSON? Because I use the demo data all the time and there is nothing wrong in the structure or the format. |
I don't understand your reasoning. I used VS Code to fix the JSON. VS Code
had nothing to do with the original problem.
… Message ID: ***@***.***
com>
|
If you did not modify the data yourself, the fix-json utility should not be needed IMO. I have not seen the error on 3.4 or 3.5 yet. Whatever issues were detected were already fixed for those versions last week |
If you'd like to work together to find a solution, I'm happy to assist. If
you only want to gaslight me, let's just move on.
…On Fri, Apr 21, 2023 at 3:18 PM Abhimanyu Saharan ***@***.***> wrote:
If you did not modify the data yourself, the fix-json utility should not
be needed IMO. I have not seen the error on 3.4 or 3.5 yet. Whatever issues
were detected were already fixed for those versions last week
—
Reply to this email directly, view it on GitHub
<#2 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADLIWNB7BTLDTFYCSUH3H3TXCLMRVANCNFSM47IBHSCQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
I did not intend to gaslight you at all. Not sure why you felt that. If you have the exact stackstrace, I can look into the issue but as I mentioned earlier, there is no issue as far as the latest data is concerned. We use the same to build nightly build the demo instances as well. |
I'll see if I can repro the issue tonight. If I can, I'll post the stack
trace.
…On Fri, Apr 21, 2023, 3:45 PM Abhimanyu Saharan ***@***.***> wrote:
I did not intend to gaslight you at all. Not sure why you felt that. If
you have the exact stackstrace, I can look into the issue but as I
mentioned earlier, there is no issue as far as the latest data is
concerned. We use the same to build nightly build the demo instances as
well.
—
Reply to this email directly, view it on GitHub
<#2 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADLIWNDOZOAG5QSKPYB7D5DXCLPV7ANCNFSM47IBHSCQ>
.
You are receiving this because you commented.
Message ID: ***@***.***
com>
|
OK, I think it had something to do with my docker installation. I don't know exactly what. I just know that it worked when I deleted all volumes, images and containers, pruned it, and updated docker to the latest version. For anyone who comes across this in the future, here are the exact instructions to install netbox-docker and import the data, using version 3.4. This was done on a Mac, but the steps will probably work with Debian-based Linux distros, including WSL. Install netbox-docker
Clone the netbox-demo-data
Drop the database
Recreate the database and import the demo data
|
I have issues with importing the data, too.
The JSON seems to be fine. |
I have problems with the Ipmort:
(venv) sw@sw-VirtualBox:/opt/netbox/netbox$ ./manage.py loaddata -v 3 netbox-demo.json
Loading 'netbox-demo' fixtures...
Checking '/opt/netbox-2.11.7/netbox' for fixtures...
Installing json fixture 'netbox-demo' from '/opt/netbox-2.11.7/netbox'.
Traceback (most recent call last):
File "/opt/netbox-2.11.7/venv/lib/python3.9/site-packages/django/core/serializers/json.py", line 69, in Deserializer
objects = json.loads(stream_or_string)
File "/usr/lib/python3.9/json/init.py", line 346, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.9/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.9/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 7 column 1 (char 6)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/netbox-2.11.7/netbox/./manage.py", line 10, in
execute_from_command_line(sys.argv)
File "/opt/netbox-2.11.7/venv/lib/python3.9/site-packages/django/core/management/init.py", line 419, in execute_from_command_line
utility.execute()
File "/opt/netbox-2.11.7/venv/lib/python3.9/site-packages/django/core/management/init.py", line 413, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/opt/netbox-2.11.7/venv/lib/python3.9/site-packages/django/core/management/base.py", line 354, in run_from_argv
self.execute(*args, **cmd_options)
File "/opt/netbox-2.11.7/venv/lib/python3.9/site-packages/django/core/management/base.py", line 398, in execute
output = self.handle(*args, **options)
File "/opt/netbox-2.11.7/venv/lib/python3.9/site-packages/django/core/management/commands/loaddata.py", line 78, in handle
self.loaddata(fixture_labels)
File "/opt/netbox-2.11.7/venv/lib/python3.9/site-packages/django/core/management/commands/loaddata.py", line 123, in loaddata
self.load_label(fixture_label)
File "/opt/netbox-2.11.7/venv/lib/python3.9/site-packages/django/core/management/commands/loaddata.py", line 181, in load_label
for obj in objects:
File "/opt/netbox-2.11.7/venv/lib/python3.9/site-packages/django/core/serializers/json.py", line 74, in Deserializer
raise DeserializationError() from exc
django.core.serializers.base.DeserializationError: Problem installing fixture '/opt/netbox-2.11.7/netbox/netbox-demo.json':
(venv) sw@sw-VirtualBox:/opt/netbox/netbox$
The text was updated successfully, but these errors were encountered: