Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pipeline.jinja2: pipeline is not a package #698

Open
jesusch opened this issue Sep 20, 2019 · 0 comments
Open

pipeline.jinja2: pipeline is not a package #698

jesusch opened this issue Sep 20, 2019 · 0 comments

Comments

@jesusch
Copy link

jesusch commented Sep 20, 2019

installed software

python 3.7.3
Django                   1.11.23    
django-appconf           1.0.3      
django-compressor        2.3        
django-jinja             2.4.1      
django-pipeline          1.6.14     
django-redis             4.10.0

settings.py:

INSTALLED_APPS = ( ..., 'pipeline', )

TEMPLATES = [
    {
        'BACKEND': 'django_jinja.backend.Jinja2',
        'DIRS': [  os.path.join(BASE_DIR, 'templates/'),],
        'APP_DIRS': True,
        'OPTIONS': {
            "match_extension": ".html",
            'context_processors': [...],
            'extensions':  [ 'pipeline.jinja2.PipelineExtension', ],
        },
    },
]

throws the following error:

Traceback:

File "/Users/jesusch/git/tvs-frontend/venv/lib/python3.7/site-packages/django/template/utils.py" in __getitem__
  65.             return self._engines[alias]

During handling of the above exception (module 'pipeline' has no attribute '__path__'), another exception occurred:

File "/Users/jesusch/git/tvs-frontend/venv/lib/python3.7/site-packages/django/core/handlers/exception.py" in inner
  41.             response = get_response(request)

File "/Users/jesusch/git/tvs-frontend/venv/lib/python3.7/site-packages/django/core/handlers/base.py" in _legacy_get_response
  249.             response = self._get_response(request)

File "/Users/jesusch/git/tvs-frontend/venv/lib/python3.7/site-packages/django/core/handlers/base.py" in _get_response
  187.                 response = self.process_exception_by_middleware(e, request)

File "/Users/jesusch/git/tvs-frontend/venv/lib/python3.7/site-packages/django/core/handlers/base.py" in _get_response
  185.                 response = wrapped_callback(request, *callback_args, **callback_kwargs)

File "/Users/jesusch/git/tvs-frontend/venv/lib/python3.7/site-packages/django/views/decorators/debug.py" in sensitive_post_parameters_wrapper
  76.             return view(request, *args, **kwargs)

File "/Users/jesusch/git/tvs-frontend/venv/lib/python3.7/site-packages/django/utils/decorators.py" in _wrapped_view
  149.                     response = view_func(request, *args, **kwargs)

File "/Users/jesusch/git/tvs-frontend/venv/lib/python3.7/site-packages/django/views/decorators/cache.py" in _wrapped_view_func
  57.         response = view_func(request, *args, **kwargs)

File "/Users/jesusch/git/tvs-frontend/tvsquared/user/views/login.py" in login
  116.         response = render(request, 'user/login.html', {'form': form, 'next': redirect_to, 'hashpath': hashpath, 'unlockTime': unlockTime})

File "/Users/jesusch/git/tvs-frontend/venv/lib/python3.7/site-packages/django/shortcuts.py" in render
  30.     content = loader.render_to_string(template_name, context, request, using=using)

File "/Users/jesusch/git/tvs-frontend/venv/lib/python3.7/site-packages/django/template/loader.py" in render_to_string
  67.         template = get_template(template_name, using=using)

File "/Users/jesusch/git/tvs-frontend/venv/lib/python3.7/site-packages/django/template/loader.py" in get_template
  18.     engines = _engine_list(using)

File "/Users/jesusch/git/tvs-frontend/venv/lib/python3.7/site-packages/django/template/loader.py" in _engine_list
  72.     return engines.all() if using is None else [engines[using]]

File "/Users/jesusch/git/tvs-frontend/venv/lib/python3.7/site-packages/django/template/utils.py" in all
  89.         return [self[alias] for alias in self]

File "/Users/jesusch/git/tvs-frontend/venv/lib/python3.7/site-packages/django/template/utils.py" in <listcomp>
  89.         return [self[alias] for alias in self]

File "/Users/jesusch/git/tvs-frontend/venv/lib/python3.7/site-packages/django/template/utils.py" in __getitem__
  80.             engine = engine_cls(params)

File "/Users/jesusch/git/tvs-frontend/venv/lib/python3.7/site-packages/django_jinja/backend.py" in __init__
  188.         self.env = environment_cls(**options)

File "/Users/jesusch/git/tvs-frontend/venv/lib/python3.7/site-packages/jinja2/environment.py" in __init__
  333.         self.extensions = load_extensions(self, extensions)

File "/Users/jesusch/git/tvs-frontend/venv/lib/python3.7/site-packages/jinja2/environment.py" in load_extensions
  85.             extension = import_string(extension)

File "/Users/jesusch/git/tvs-frontend/venv/lib/python3.7/site-packages/jinja2/utils.py" in import_string
  143.         return getattr(__import__(module, None, None, [obj]), obj)

Exception Type: ModuleNotFoundError at /u/login/
Exception Value: No module named 'pipeline.jinja2'; 'pipeline' is not a package
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant