WebFaction
Community site: login faq

i am using web factional server as deploy my django site in that pass all the code and pass requirement.txt also after that i want to load data in database using python manage.py load data using json file

my database in postgresql

but when i give python manage.py load data aa.json command so it give error like "raise Value error("No Json object could be decoded") django.core.serializes.base.Depersonalization: Problem installing fixture :no Json Object could be decoded"

or how we loaddata inwebfaction server with djangocms

asked 26 Apr '16, 13:20

Kartik Danid...
11
accept rate: 0%


Try specifying the python version, and verify it will run with the runserver command,

python3.4 manage.py runserver

This should execute correctly. If it does than use your loaddata command.

The error itself suggests the JSON object in the 'aa.json' file might be malformed.

Try reading the file and verify it is a valid JSON object. If it is a large JSON file download it and open it with you browser using a JSON reading plugin, this should verify if the syntax is correct without reading the complete file manually.

permanent link

answered 26 Apr '16, 21:47

johns
5.4k312
accept rate: 23%

hi johns , but .json file is generated using "python manage.py dumpdata" command from django virtual env

(27 Apr '16, 05:15) Kartik Danid...

i also check json file into json validator it look ok

(27 Apr '16, 05:32) Kartik Danid...

hi johns my site in multi lingual en/fr i want to know that reason of error is multilingual or not in database

(27 Apr '16, 09:29) Kartik Danid...

Postgres by default uses unicode and should not need any further encoding configurations. What encoding are you using, you should be able to check in the control panel? I assume the file was built using Django dumpdata, but sometimes it does not create the file fully or its possible it broke after editing. Reading the file should validate this or not.

(27 Apr '16, 21:36) johns

hi i created new dump file and try to load data in database but it give same error

(28 Apr '16, 04:15) Kartik Danid...

No Json object could be decoded definitely suggests a problem with the database dump. It could be an issue with the JSON file; it could also be an issue with the dumpdata command, or a version incompatibility. You might be able to just export the data directly from PostgreSQL to a database backup file (not using manage.py at all, but rather pg_dump) and then import the backup into the database instead. More information is available here.

(28 Apr '16, 09:43) ryans ♦♦
showing 5 of 6 show 1 more comments
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×109
×7

question asked: 26 Apr '16, 13:20

question was seen: 1,965 times

last updated: 28 Apr '16, 09:43

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM