Build.py runtime error: No django root directory found

222 views
Skip to first unread message

Niall

unread,
Mar 25, 2012, 7:02:46 PM3/25/12
to pyins...@googlegroups.com
I get the following error when I call Build.py on my project spec file
No django root directory found. Please check your pathex definition in the project spec file.

It seems pretty self explatory, but placing the django root in the pathex in my project file doesn't fix the matter---the runtime error. I've tried a lot of things (re-configuring, re-makespec'ing, etc) but nothing has worked yet. Any assistance will be greatly appreciated!

Python 2.7. PyInstaller 1.51. Windows 7 64 bit. Django 1.4

Giovanni Bajo

unread,
Mar 25, 2012, 10:34:07 PM3/25/12
to pyins...@googlegroups.com
Are you following this recipe?

The new django project layout in 1.4 is not supported yet btw.
-- 
Giovanni Bajo   ::  ra...@develer.com
Develer S.r.l.  ::  http://www.develer.com

My Blog: http://giovanni.bajo.it





Niall

unread,
Mar 26, 2012, 12:38:06 PM3/26/12
to pyins...@googlegroups.com
Thanks for the reply. 

That fixed it alright. I had to modify my project to the django layout, and do the bootstrap thing too.

The thing is though, my project isn't a django project... what reasons might pyinstaller think it is? 

Thanks 

Giovanni Bajo

unread,
Mar 26, 2012, 1:25:23 PM3/26/12
to pyins...@googlegroups.com
Il giorno 26/mar/2012, alle ore 18:38, Niall ha scritto:

Thanks for the reply. 

That fixed it alright. I had to modify my project to the django layout, and do the bootstrap thing too.

The thing is though, my project isn't a django project... what reasons might pyinstaller think it is? 

It happens because somebody is importing django. It might be a third-party library you are using, and it might be a code-path that you are not actually executing (eg: you configured at runtime not to use django, but PyInstaller can't know that).

If you don't need Django, then you don't need the above fixes either, and the simplest solution is to exclude django from the deployment (see the manual on how to modify the spec file to exclude a specific package).

If you are curious you can bump the log verbosity; at some point, it will start dumping all modules that it analyzes, so that you can find where django is being imported.

Niall

unread,
Mar 26, 2012, 2:06:21 PM3/26/12
to pyins...@googlegroups.com
Thanks again. Will do some reading on the matter. 
Reply all
Reply to author
Forward
0 new messages