Question

during the last days I am observing a very strange behavior in one of my django projects:

When I run some manage.py commands I see that although the commands are executed they do not end. For instance, if I try running syncdb:

c:\django> python manage.py syncdb
Syncing...
Creating tables ...
Creating table questions_category
Creating table questions_question
Creating table questions_answer
Installing custom SQL ...
Installing indexes ...
Installed 0 object(s) from 0 fixture(s)

At this time I should get a command input - but I don't! I have the same behavior with various other manage.py commands - they are running ok but they don't exit (for instance dumpdata or loadata - the data is dumped/loaded ok but when these finish I don't get the command prompt)! Has anybody observed the same behavior ? Is there a way to debug that ? I tried adding print statements at the end of my settings.py and I could see the output without problem.

Also, another problem I have which probably is related to the above is that the runserver_plus command no longer is able to find out code changes. So, when I run manage.py runserver_plus and change for instance my settings.py I see this:

 * Detected change in 'C:\\progr\\py\\adeies\\adeies\\settings.py', reloading

And it stops there :( It doesnt reload the application ! Using the normal runserver reloads the application without problem however for obvious reasons I prefer using the runserver_plus command.

Do you have any ideas on how to debug this ?

Thanks !

Was it helpful?

Solution

Some dependency might be starting a thread. Django will wait for all threads to finish when autoreloading on code changes, or executing a management command. Inspect all dependencies to identify which one might be causing this problem.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top