Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

empty_block = blocks.pop(0) Classytags parser IndexError after upgrading from Django-CMS 2.3 to 2.3.1 #1413

Closed
samzhao opened this Issue · 1 comment

2 participants

@samzhao

I'm running Django 1.4.1, Python 2.7.3, classytags version 0.3.4.1. Then few days ago, I upgraded Django-CMS 2.3 to 2.3.1 by doing pip install -U django-cms. As I resync everything and runserver, the following traceback appears:

Traceback (most recent call last):
  File "C:\dev\virtualenvs\djangocmsenv\vbsite\manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "c:\python27\lib\site-packages\django\core\management\__init__.py", line
443, in execute_from_command_line
    utility.execute()
  File "c:\python27\lib\site-packages\django\core\management\__init__.py", line
382, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "c:\python27\lib\site-packages\django\core\management\base.py", line 196, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "c:\python27\lib\site-packages\django\core\management\base.py", line 217, in execute
    translation.activate('en-us')
  File "c:\python27\lib\site-packages\django\utils\translation\__init__.py", line 105, in activate
    return _trans.activate(language)
  File "c:\python27\lib\site-packages\django\utils\translation\trans_real.py", line 194, in activate
    _active.value = translation(language)
  File "c:\python27\lib\site-packages\django\utils\translation\trans_real.py", line 183, in translation
    default_translation = _fetch(settings.LANGUAGE_CODE)
  File "c:\python27\lib\site-packages\django\utils\translation\trans_real.py", line 160, in _fetch
    app = import_module(appname)
  File "c:\python27\lib\site-packages\django\utils\importlib.py", line 35, in import_module
    __import__(name)
  File "C:\dev\virtualenvs\djangocmsenv\Lib\site-packages\cms\__init__.py", line 9, in <module>
    patch_settings()
  File "C:\dev\virtualenvs\djangocmsenv\Lib\site-packages\cms\conf\__init__.py", line 39, in patch_settings
    post_patch_check()
  File "C:\dev\virtualenvs\djangocmsenv\Lib\site-packages\cms\conf\patch.py", line 56, in post_patch_check
    if not validate_template(template[0], ['js', 'css']):
  File "C:\dev\virtualenvs\djangocmsenv\Lib\site-packages\sekizai\helpers.py", line 97, in validate_template
    found = get_namespaces(template)
  File "C:\dev\virtualenvs\djangocmsenv\Lib\site-packages\sekizai\helpers.py", line 87, in get_namespaces
    compiled_template = get_template(template)
  File "c:\python27\lib\site-packages\django\template\loader.py", line 145, in get_template
    template, origin = find_template(template_name)
  File "c:\python27\lib\site-packages\django\template\loader.py", line 134, in find_template
    source, display_name = loader(name, dirs)
  File "c:\python27\lib\site-packages\django\template\loader.py", line 42, in __call__
    return self.load_template(template_name, template_dirs)
  File "c:\python27\lib\site-packages\django\template\loader.py", line 48, in load_template
    template = get_template_from_string(source, origin, template_name)
  File "c:\python27\lib\site-packages\django\template\loader.py", line 156, in get_template_from_string
    return Template(source, origin, name)
  File "c:\python27\lib\site-packages\django\template\base.py", line 125, in __init__
    self.nodelist = compile_string(template_string, origin)
  File "c:\python27\lib\site-packages\django\template\base.py", line 153, in compile_string
    return parser.parse()
  File "c:\python27\lib\site-packages\django\template\base.py", line 267, in parse
    compiled_result = compile_func(self, token)
  File "c:\python27\lib\site-packages\django\template\loader_tags.py", line 214, in do_extends
    nodelist = parser.parse()
  File "c:\python27\lib\site-packages\django\template\base.py", line 267, in parse
    compiled_result = compile_func(self, token)
  File "C:\dev\virtualenvs\djangocmsenv\Lib\site-packages\classytags\core.py", line 88, in __init__
    self.kwargs, self.blocks = self.options.parse(parser, tokens)
  File "C:\dev\virtualenvs\djangocmsenv\Lib\site-packages\classytags\core.py", line 55, in parse
    return argument_parser.parse(parser, tokens)
  File "C:\dev\virtualenvs\djangocmsenv\Lib\site-packages\classytags\parser.py", line 35, in parse
    self.parse_blocks()
  File "C:\dev\virtualenvs\djangocmsenv\Lib\site-packages\cms\templatetags\cms_tags.py", line 156, in parse_blocks
    return super(PlaceholderParser, self).parse_blocks()
  File "C:\dev\virtualenvs\djangocmsenv\Lib\site-packages\classytags\parser.py", line 169, in parse_blocks
    empty_block = blocks.pop(0)
IndexError: pop from empty list

I don't know if it's caused by Django-CMS, classytags or something wrong I did that worked in 2.3. Please help me figure out what's wrong. Thanks

@digi604
Collaborator

closing as too old an nobody seams to have an idea.

@digi604 digi604 closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.