tags:

views:

1543

answers:

4

I installed the registration module, added it to settings.py. When I tried to run syncdb (% python sitename/manage.py syncdb --settings sitename.devsettings)

It gave me "Error: No module named registration"

The same setup works (using the same files for everything) fine on the server. This happens on my local machine running OS X.

I checked the sys.path, the path where registration module resides is listed, and the actual module is in place as well. Since there is not much else being outputted, I am not sure how to debug further. What could be causing this problem?

A: 

My first guess would be you haven't added 'registration' into installed apps in the settings.py file.

Perhaps you are using a different settings.py (Or localsettings.py) on the server.

Lakshman Prasad
That wouldn't give that error. Anyway, he specifically states he has added it to settings.py.
Daniel Roseman
+2  A: 

There may be Python errors in your registration models. Try starting a shell and importing them, instantiating them, etc.

Johnny G
A: 

Just try this

1) Put down the registration app inside your project as an app

and do the syncdb


do the below for finding out the exact cause of error

1.go to you project directory
2.python manage.py dbshell
3.in shell
4.import registration   
5.if you get error here which means your registration module is  not
there on the python path (or) some problem in finding that one.
if it works then some other problem like improper compilation .............
Rama Vadakattu
I did that. Got the error when doing syncdb.
Boon
edited my answer please see and try out those steps.
Rama Vadakattu
"import registration" works. Still as stuck as before :(
romkyns
A: 

Since this page ranks nicely in Google, it seems like a good place for a general answer that might help. Sometimes the folder name in svn/git is different than the folder name in settings.py -- a trap for the unwary.

So, if INSTALLED_APPS references your stuff as mywhatever.someapp then it's likely you want settings.py to be in the "mywhatever" folder, with a subfolder "someapp" that contains an init.py file.

Scott Lawton