Ask Your Question
0

No module named askbot_stm.urls

asked 2011-05-24 12:17:31 -0600

anonymous user

Anonymous

I just tried to put my askbot site online, but I get the following error :

Environment:


Request Method: GET
Request URL: ___

Django Version: 1.3
Python Version: 2.6.4
Installed Applications:
['django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.admin',
 'django.contrib.humanize',
 'django.contrib.sitemaps',
 'askbot',
 'askbot.deps.django_authopenid',
 'south',
 'askbot.deps.livesettings',
 'keyedcache',
 'robots',
 'django_countries',
 'djcelery',
 'djkombu']
Installed Middleware:
('django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'askbot.middleware.anon_user.ConnectToSessionMessagesMiddleware',
 'askbot.middleware.pagesize.QuestionsPageSizeMiddleware',
 'askbot.middleware.cancel.CancelActionMiddleware',
 'askbot.deps.recaptcha_django.middleware.ReCaptchaMiddleware',
 'django.middleware.transaction.TransactionMiddleware',
 'askbot.middleware.view_log.ViewLogMiddleware',
 'askbot.middleware.spaceless.SpacelessMiddleware')


Traceback:
File "/opt/python2.6/lib/python2.6/site-packages/django/core/handlers/base.py" in get_response
  101.                             request.path_info)
File "/opt/python2.6/lib/python2.6/site-packages/django/core/urlresolvers.py" in resolve
  250.             for pattern in self.url_patterns:
File "/opt/python2.6/lib/python2.6/site-packages/django/core/urlresolvers.py" in _get_url_patterns
  279.         patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/opt/python2.6/lib/python2.6/site-packages/django/core/urlresolvers.py" in _get_urlconf_module
  274.             self._urlconf_module = import_module(self.urlconf_name)
File "/opt/python2.6/lib/python2.6/site-packages/django/utils/importlib.py" in import_module
  35.     __import__(name)

Exception Type: ImportError at /
Exception Value: No module named askbot_stm.urls

askbot_stm in my project name, and there is definitely a file names urls.py in the root folder. Does anyone have an idea on how to solve this ?

Thank you !

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2011-05-24 12:43:36 -0600

Evgeny gravatar image

updated 2011-05-24 14:23:54 -0600

Hi, it's either because you do not have __init__.py (even empty) in the askbot_stm directory, or this directory is not on the python system path.

There is an environment variable that you can use, called PYTHONPATH.

PYTHONPATH=/path/to_dir_above_askbot_stm
export PYTHONPATH
edit flag offensive delete link more
0

answered 2011-05-24 13:23:35 -0600

AlexP gravatar image

The __init__.py file is there.

And I just wrote the two commands you gave me in a terminal, but I still have the error. Or should I put them in a file ?

Thank you for your help !

edit flag offensive delete link more

Comments

Sorry, try directory that is one level above the askbot_stm in the command.
Evgeny gravatar imageEvgeny ( 2011-05-24 13:26:51 -0600 )edit
It gives me the same result. But I juste notice that my wsgi was not the same as the one in the documentation. So I replace it, and now it work perfectly ! My bad ... I'm sorry for wasting your time. And thank you for your help !
AlexP gravatar imageAlexP ( 2011-05-24 13:37:43 -0600 )edit
It gives me the same result.
AlexP gravatar imageAlexP ( 2011-05-24 13:37:45 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2011-05-24 12:17:31 -0600

Seen: 303 times

Last updated: May 27 '11