PythonAnywhere Forums

No module named RequireDebugFalse

admin update -- this problem was due to differences between our default version of Django and the user's version. See our guide to setting up a virtualenv to user a newer version of Django

Hello all, anybody see this problem: "No module named RequireDebugFalse" when running: python manage.py syncdb ? (My code was developed on my machine , trying to deploy here.)

00:09 ~/aqw/aqutowww/src $ python manage.py syncdb
Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python2.6/dist-packages/Django-1.3.1-py2.6.egg/django/core/management/__init__.py", line 429, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python2.6/dist-packages/Django-1.3.1-py2.6.egg/django/core/management/__init__.py", line 379, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python2.6/dist-packages/Django-1.3.1-py2.6.egg/django/core/management/__init__.py", line 252, in         fetch_command
    app_name = get_commands()[subcommand]
  File "/usr/local/lib/python2.6/dist-packages/Django-1.3.1-py2.6.egg/django/core/management/__init__.py", line 101, in get_commands
    apps = settings.INSTALLED_APPS
  File "/usr/local/lib/python2.6/dist-packages/Django-1.3.1-py2.6.egg/django/utils/functional.py", line 276, in __getattr__
self._setup()
  File "/usr/local/lib/python2.6/dist-packages/Django-1.3.1-py2.6.egg/django/conf/__init__.py", line 42, in _setup
self._wrapped = Settings(settings_module)
  File "/usr/local/lib/python2.6/dist-packages/Django-1.3.1-py2.6.egg/django/conf/__init__.py", line 139, in __init__
logging_config_func(self.LOGGING)
  File "/usr/local/lib/python2.6/dist-packages/Django-1.3.1-py2.6.egg/django/utils/dictconfig.py", line 553, in dictConfig
dictConfigClass(config).configure()
  File "/usr/local/lib/python2.6/dist-packages/Django-1.3.1-py2.6.egg/django/utils/dictconfig.py", line 339, in configure
'filter %r: %s' % (name, e))
ValueError: Unable to configure filter 'require_debug_false': Cannot resolve 'django.utils.log.RequireDebugFalse': No module named RequireDebugFalse
00:09 ~/aqw/aqutowww/src $

Hello, this looks like it is caused by using a settings.py that was created with a different version of Django. You could either change the settings.py file to make it work with the local version of Django or you could install a version of Django inside a virtualenv on PythonAnywhere. There is this stackoverflow post which gives a bit of detail about the issue. If you want to fix your settings.py file then you could try doing a

django-admin.py startproject test_project

On PythonAnywhere and then using that fresh settings.py file to compare against the old one.

That looks like a difference in Django versions between your local development and PythonAnywhere. You can either install the version we use (1.3.1) on your machine or you can use virtualenv to install the one you use on PythonAnywhere. Here is a forum post where I helped someone get Django 1.4 working on PythonAnywhere. Just change the version you install to match the one you're using locally. There is also a StackOverflow question that covers some other options that may be useful

Snap! Double the help. This is what happens when we aren't working in the same room :-)

Thanks for the help I installed 1.4 and now the command works! The app does nothing. If I put an error in urls.py it does not complain. So I guess it is not finding the code. The logs show nothing. I also looked at the sqlite file --all the tables are there.

Hello Ionoami,

I've had a bit of a look at your config and I'll send you an email, looks like the path to your settings.py is incorrect.