1
votes

I'm trying to load fixture:

python manage.py loaddata stock/fixtures/initial_data.json

But error occurred without traceback (I don't know which model is the problem):

ValueError: Problem installing fixture 'stock/fixtures/initial_data.json': The database backend does not accept 0 as a value for AutoField.

How get the traceback?

1
You should get it as a part of your error message, what IDE are you using or is this just command line?Games Brainiac
It's a command line. So no more output.bux
Your fixture contains 0 as identifier for an object. Is the fixture file small enough for manual inspection?Simeon Visser
Good idea ! I found the line in json file. Thank's ;)bux

1 Answers

1
votes

There's a --traceback option.

python manage.py loaddata stock/fixtures/initial_data.json --traceback

This isn't mentioned in the loaddata docs, it's part of the default command options.