"Failed to get real commands" when trying to run django's manage.py tasks.

I upgraded to 4.5 today and now when I run tools -> run manage.py task it says "fetching django commands" with a progress bar, then dies with the error "Failed to get real commands on module <modulename>, python process died with code 0: unknown error.

It does pop open the "new?" manage.py@<modulename> window down below, and running tasks there seems to work ok.  I've restarted the application but the error still appears.  So I can no longer use the popup window for run manage.py task.

Any thoughts?
9 comments
Installed 4.5.1 today and still experiencing this issue... =/
0
Same problem here with 4.5.0 and 4.5.1. Some Django projects work and some not and I can't find the difference.
0
Hello Jared and Matthias,
Could you please attach screenshot which shows the issue?
0
Here is a screenshot of the message.

failed_to_get_command.gif
0
I think I found at least one reason for the error. Well, maybe not the reason for the error itself, but the reason that caused it.

I started modifying my settings file according to the changes in Django 1.8 and during the developing process I used print in the file as a poor mans debugger. Somehow this new manage.py stuff doesn't like this. When I removed the print everything was fine.
0
Matthias,
Thanks for your reply.

Jared, do you have the same problem? Could you please attach screenshot with the issue?
0
reply


Hi Anna,

Matthias was correct.  I had "development" settings file that loads settings.py first then adds some development django 'apps' that aren't in the main settings file.  Bottom line is there was a print statement that said something like 'running with dev1 settings' which broke things.  After commenting the print everything seems to work fine now.  Thanks!
0

Hey, 

I am getting the same error here is the screenshot. This app i just created today. Like an year back I have created some applications which work well but the new one gives this error. That time I used to use a licensed version and now my license got expired has this been an impact on the newly created project?

0

I had a similar issue:

Failed to get real commands on module "[myprojectname]": python process died with code 2: runnerw.exe: CreateProcess failed with error 2: The system cannot find the file specified.

I believe the issue was caused by having created another project with the same name and/or deleting a project in the same place and re-creating.

I resolved it by going to File > Settings > Project: [myprojectname] > Project Interpreter  (or ctrl + alt+ s)
Click the cog icon in the top right
Select "Show All..."

Now delete duplicated or broken Interpreters

OK (the project interpreters window)

On the Settings window (ctrl + alt + s), make sure a correct project interpreter is selected.

OK

 

0

Please sign in to leave a comment.