No fixture named 'X' found

Viewed 13455

I'm using Django 1.6 and I use South to handle migrations. In most of my application I used to have initial_data.json files. I converted them to be loaded with migrations rather than automatically by Django (as this is recommended in the documentation)

I was using version 0.8.2 of South when I ran into a weird behavior / bug where loading fixtures is done according to the model code and not the state of the migration. I saw that the newest version (0.8.4) has since added some bug fixes related to loaddata, so I upgraded to it.

Now I get the following error on all the migration that load fixtures:

UserWarning: No fixture named 'X' found. 

When I use Django's loaddata it works fine. Any ideas on how to solve this?

4 Answers

This error also occurs when the filename does not include the '.json' extension.

In order to load a fixture from current working directory it has to end with '.json'.

Related