Skip to content

SyntaxException: Unmatched '"' #86

Closed
@sqlalchemy-bot

Description

@sqlalchemy-bot

Migrated issue, originally created by Anonymous

If I put the following in my template, I get a SyntaxException: <% somethingText = """ %>

Is this normal? Am I doing something wrong maybe? I'm using Mako 0.2.0 under mod_python. Here is part of the stacktrace:

File "e:\python\lib\site-packages\mako-0.2.0-py2.5.egg\mako\lookup.py", line 70, in get_template
return self.__load(srcfile, uri)

File "e:\python\lib\site-packages\mako-0.2.0-py2.5.egg\mako\lookup.py", line 112, in __load
self.__collection[uri] = Template(uri=uri, filename=posixpath.normpath(filename), lookup=self, module_filename=(self.modulename_callable is not None and self.modulename_callable(filename, uri) or None), **self.template_args)

File "e:\python\lib\site-packages\mako-0.2.0-py2.5.egg\mako\template.py", line 82, in init
_compile_module_file(self, file(filename).read(), filename, path)

File "e:\python\lib\site-packages\mako-0.2.0-py2.5.egg\mako\template.py", line 217, in _compile_module_file
node = lexer.parse()

File "e:\python\lib\site-packages\mako-0.2.0-py2.5.egg\mako\lexer.py", line 160, in parse
if self.match_python_block():

File "e:\python\lib\site-packages\mako-0.2.0-py2.5.egg\mako\lexer.py", line 274, in match_python_block
(text, end) = self.parse_until_text(r'%>')

File "e:\python\lib\site-packages\mako-0.2.0-py2.5.egg\mako\lexer.py", line 79, in parse_until_text
raise exceptions.SyntaxException("Unmatched '%s'" % match.group(1), **self.exception_kwargs)

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions