0

I am installing a python project from github (https://github.com/sunlightlabs/publicmarkup) and I get this error message :

File "/usr/local/lib/python2.7/dist-packages/django/core/servers/basehttp.py", line 283, in run
    self.result = application(self.environ, self.start_response)

  File "/usr/local/lib/python2.7/dist-packages/django/contrib/staticfiles/handlers.py", line 68, in __call__
    return self.application(environ, start_response)

  File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/wsgi.py", line 273, in __call__
    response = self.get_response(request)

  File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 169, in get_response
    response = self.handle_uncaught_exception(request, resolver, sys.exc_info())

  File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 214, in handle_uncaught_exception
    if resolver.urlconf_module is None:

  File "/usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py", line 274, in _get_urlconf_module
    self._urlconf_module = import_module(self.urlconf_name)

  File "/usr/local/lib/python2.7/dist-packages/django/utils/importlib.py", line 35, in import_module
    __import__(name)

  File "/home/mbenchoufi/git/publicmarkup/../publicmarkup/urls.py", line 5, in <module>
    add_to_builtins('mediasync/templatetags/media')

  File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 1016, in add_to_builtins
    builtins.append(import_library(module))

  File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 951, in import_library
    app_path, taglib = taglib_module.rsplit('.',1)

ValueError: need more than 1 value to unpack

I am a newbie to python, what does this error message means ?

4
  • 1
    Please post the full traceback. taglib_module doesn't contain a . period character so there is nothing to split, but why this is the case depends on the rest of the code path. Commented Sep 29, 2012 at 21:43
  • Which python project? What do you mean by "installing"? (As in, what command you're executing?) Commented Sep 29, 2012 at 21:43
  • 1
    Otherwise, what the error means at a basic level is that the expression taglib_module.rsplit('.',1) returned an iterable with only one element. Commented Sep 29, 2012 at 21:45
  • @MartijnPieters I have just edited the traceback Commented Sep 29, 2012 at 21:47

1 Answer 1

1

The add_to_builtins call in publicmarkup/urls.py is incorrect, it should probably be:

add_to_builtins('mediasync.templatetags.media')

Python packages are dot-delimited and the author used a path instead.

Later on, the Django framework tries to load the module, and splitting off the last name after the last dot fails as there are no dots in the original call.

It looks like the project you are trying to load is fundamentally broken. It probably will have other errors as well.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.