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

Page Templates: Non-ASCII ID breaks trying to assign a title #574

dataflake opened this issue Apr 28, 2019 · 0 comments


Copy link

commented Apr 28, 2019

Creating a Page Template with a non-ASCII ID and default content works fine, and it renders without issue. It breaks inside title_and_id as soon as you add a title. This is on Python 2.

Traceback (most recent call last):
  File "/Users/jens/src/.eggs/waitress-1.2.1-py2.7.egg/waitress/", line 336, in service
  File "/Users/jens/src/.eggs/waitress-1.2.1-py2.7.egg/waitress/", line 175, in service
  File "/Users/jens/src/.eggs/waitress-1.2.1-py2.7.egg/waitress/", line 452, in execute
    app_iter =, start_response)
  File "/Users/jens/src/zope/Zope/src/ZPublisher/", line 30, in __call__
    return self.application(environ, start_response)
  File "/Users/jens/src/.eggs/Paste-3.0.8-py2.7.egg/paste/", line 69, in __call__
    return self.application(environ, replacement_start_response)
  File "/Users/jens/src/zope/Zope/src/ZPublisher/", line 296, in publish_module
    response = _publish(request, new_mod_info)
  File "/Users/jens/src/zope/Zope/src/ZPublisher/", line 230, in publish
  File "/Users/jens/src/zope/Zope/src/ZPublisher/", line 85, in mapply
    return debug(object, args, context)
  File "/Users/jens/src/zope/Zope/src/ZPublisher/", line 59, in call_object
    return obj(*args)
  File "/Users/jens/src/zope/Zope/src/Products/PageTemplates/", line 170, in pt_editAction
    return self.pt_editForm(manage_tabs_message=message)
  File "/Users/jens/src/zope/Zope/src/Shared/DC/Scripts/", line 333, in __call__
    return self._bindAndExec(args, kw, None)
  File "/Users/jens/src/zope/Zope/src/Shared/DC/Scripts/", line 370, in _bindAndExec
    return self._exec(bound_data, args, kw)
  File "/Users/jens/src/zope/Zope/src/Products/PageTemplates/", line 145, in _exec
    return self.pt_render(extra_context=bound_names)
  File "/Users/jens/src/zope/Zope/src/Products/PageTemplates/", line 85, in pt_render
  File "/Users/jens/src/.eggs/zope.pagetemplate-4.4.1-py2.7.egg/zope/pagetemplate/", line 135, in pt_render
    strictinsert=0, sourceAnnotations=sourceAnnotations
  File "/Users/jens/src/zope/Zope/src/Products/PageTemplates/", line 88, in __call__
    return self.template.render(**kwargs)
  File "/Users/jens/src/.eggs/", line 173, in render
    return base_renderer(**context)
  File "/Users/jens/src/.eggs/Chameleon-3.6-py2.7.egg/chameleon/zpt/", line 306, in render
    return super(PageTemplate, self).render(**_kw)
  File "/Users/jens/src/.eggs/Chameleon-3.6-py2.7.egg/chameleon/", line 209, in render
    raise_with_traceback(exc, tb)
  File "/Users/jens/src/.eggs/Chameleon-3.6-py2.7.egg/chameleon/", line 187, in render
    self._render(stream, econtext, rcontext)
  File "/Users/jens/src/buildout/zope4_py2/var/cache/", line 849, in render
    __cache_4447208976 = _static_4444906960(getitem('context'), econtext, True, ('title_and_id', ))
  File "/Users/jens/src/zope/Zope/src/Products/PageTemplates/", line 81, in __call__
    base = render(base, econtext)
  File "/Users/jens/src/zope/Zope/src/Products/PageTemplates/", line 122, in render
    ob = ob()
  File "/Users/jens/src/zope/Zope/src/OFS/", line 191, in title_and_id
    return title and ("%s (%s)" % (title, id)) or id
UnicodeDecodeError: <unprintable UnicodeDecodeError object>

@dataflake dataflake added the bug label Apr 28, 2019

@dataflake dataflake added this to the 4.0 final milestone Apr 28, 2019

@dataflake dataflake added this to To do in Zope 4 final release via automation Apr 28, 2019

@dataflake dataflake closed this in 7f2933a Apr 29, 2019

Zope 4 final release automation moved this from To do to Done Apr 29, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
1 participant
You can’t perform that action at this time.