Skip to content

Error occurring in django 1.7 #58

@alexsilva

Description

@alexsilva

For some reason pkg_resources can not find the version of the lib authtools and generates the error below:

 mod_wsgi (pid=12640): Target WSGI script '...\\wsgi.py' cannot be loaded as Python module.
 mod_wsgi (pid=12640): Exception occurred processing WSGI script '...\\wsgi.py'.
 Traceback (most recent call last):
   File "...\\wsgi.py", line 48, in <module>
     _application = get_wsgi_application()
   File "...\\django\\core\\wsgi.py", line 14, in get_wsgi_application
     django.setup()
   File "...\\django\\__init__.py", line 21, in setup
     apps.populate(settings.INSTALLED_APPS)
   File "...\\django\\apps\\registry.py", line 115, in populate
     app_config.ready()
   File "...\\xadmin\\apps.py", line 13, in ready
     self.module.autodiscover()
   File "...\\xadmin\\__init__.py", line 55, in autodiscover
     import_module('%s.adminx' % app)
   File "...\django\\utils\\importlib.py", line 46, in import_module
     __import__(name)
   File "...\\app\\adminx.py", line 4, in <module>
     from authtools.forms import UserCreationForm, AdminUserChangeForm
   File "...\\pyenv\\Lib\\site-packages\\authtools\\__init__.py", line 3, in <module>
     __version__ = pkg_resources.get_distribution('django-authtools').version
   File "...\\pkg_resources\\__init__.py", line 539, in get_distribution
     dist = get_provider(dist)
   File "...\\pkg_resources\\__init__.py", line 419, in get_provider
   File "...\\pkg_resources\\__init__.py", line 940, in require
     needed = self.resolve(parse_requirements(requirements))
   File "...\\pkg_resources\\__init__.py", line 827, in resolve
     raise DistributionNotFound(req, requirers)
 DistributionNotFound: The 'django-authtools' distribution was not found and is required by the application

If the comment line below the error disappears (authtools.init):

pkg_resources.get_distribution('django-authtools').version

See my environment is to:

Python 2.7.9
Django 1.7
Xadmin (branch django 1.7)
Apache2 (with wsgi)

django-authtools - It is installed in a virtual environment (created with virtualenv).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions