tags:

views:

97

answers:

1

Hello folks,

today I ran into an error and have no clue how to fix it.

Error: App with label XYZ could not be found. Are you sure your INSTALLED_APPS setting is correct?

Where XYZ stands for the app-name that I am trying to reset. This error shows up every time I try to reset it (manage.py reset XYZ). Show all the sql code works.

Even manage.py validate shows no error.

I already commented out every single line of code in the models.py that I touched the last three monts. (function by function, model by model) And even if there are no models left I get this error.

Here http://code.djangoproject.com/ticket/10706 I found a bugreport about this error. I also applied one the patches to allocate the error, it raises an exception so you have a trace back, but even there is no sign in what of my files the error occurred.

I don't want to paste my code right now, because it is nearly 1000 lines of code in the file I edited the most.

If someone of you had the same error please tell me were I can look for the problem. In that case I can post the important part of the source. Otherwise it would be too much at once.

Thank you for helping!!!

A: 

You don't specify which server you're using. With Apache you'll almost certainly need a restart for things to take effect. If you're using the development one try restarting that. If this doesn't work you may need to give us some more details.

I'd also check your paths as you may have edited one file but you may be using a different one.

Plus check what's still in your database, as some of your previous versions may be interfering.

Finally as a last resort I'd try a clean install (on another django instance) and see if that goes cleanly, if it does then I'd know that I'd got a conflict, if not then the problem's in the code.

Amos
hi, thx for your fast reply. About the webserver: usualy I use the development webserver, but right now there is no server running. I just ran the 'manage.py reset' command. This one should delete all tables from a specific application and create them new. But the error must occur before it can be done. I also check all the paths of the files, and I worked with the originals, so that would not be the problem. If there is no other possibility I have to try to reinstall everything again.
HWM-Rocker
Login to MySQL (or whichever database you're using) from the CLI as the Django user. Change to the Django database and show tables so that you can see what is and isn't set up in there.
Amos
OMG, I feel like someone who is calling to the IT crowed. "Have you tried to turn it off and on again?" - No don't :$ but after I did it worked again. I thought linux is reboot save, but maybe all the sleeps/wakeups must messed something up. Thank you for your time and Help!
HWM-Rocker
Almost every problem I've had with Django where I've not been able to find the cause has boiled down to me needing to reset the server, the database or the pathnames. My guess is that rebooting, reset one of these.
Amos