First time here? Check out the FAQ!
0

No JSON object could be decoded
 

python manage.py loaddata  /root/forum/data.json
/usr/lib/python2.6/site-packages/Django-1.4.3-py2.6.egg/django/conf/__init__.py:75: DeprecationWarning: The ADMIN_MEDIA_PREFIX setting has been removed; use STATIC_URL instead.
  "use STATIC_URL instead.", DeprecationWarning)
/usr/lib/python2.6/site-packages/Django-1.4.3-py2.6.egg/django/core/cache/__init__.py:82: DeprecationWarning: settings.CACHE_* is deprecated; use settings.CACHES instead.
  DeprecationWarning
WARNING!!! You are using a 'locmem' (local memory) caching backend,
which is OK for a low volume site running on a single-process server.
For a multi-process configuration it is neccessary to have a production
cache system, such as redis or memcached.

With local memory caching and multi-process setup you might intermittently
see outdated content on your site.

Problem installing fixture '/root/forum/data.json': Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/Django-1.4.3-py2.6.egg/django/core/management/commands/loaddata.py", line 190, in handle
    for obj in objects:
  File "/usr/lib/python2.6/site-packages/Django-1.4.3-py2.6.egg/django/core/serializers/json.py", line 47, in Deserializer
    raise DeserializationError(e)
DeserializationError: No JSON object could be decoded

How to Solve this ?

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
coldsystem's avatar
31
coldsystem
asked 12 years ago

Comments

see more comments

2 Answers

0

This probably means that the data.json does not actually contain data in json format.

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
Evgeny's avatar
13.2k
Evgeny
answered 12 years ago
link

Comments

see more comments
0

The file was exported with this command (python manage.py dumpdata > data.json) but importing is no success

:(

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
coldsystem's avatar
31
coldsystem
answered 12 years ago
link

Comments

see more comments