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

mako-0.7.1 with python 2.4.3 raises Attribute Error #193

Closed
sqlalchemy-bot opened this issue Jul 20, 2012 · 2 comments
Closed

mako-0.7.1 with python 2.4.3 raises Attribute Error #193

sqlalchemy-bot opened this issue Jul 20, 2012 · 2 comments
Labels
bug Something isn't working caching low priority

Comments

@sqlalchemy-bot
Copy link

Migrated issue, originally created by Anonymous

Mako-0.7.0 with python 2.4.3 raises no error.
But, Mako-0.7.0 with python 2.4.3 raises Attribute Error.

Back Trace:

Traceback (most recent call last):
  File "gen_code.py", line 232, in ?
    create_file_about_each_table(output_path, file_info['FadRec%s.h'], tables)
  File "gen_code.py", line 174, in create_file_about_each_table
    template = get_template_lookup().get_template(info['template'])
  File "/data/asaba/hrs_trunk/tool/.virtualenvs/env1/lib/python2.4/site-packages/mako/lookup.py", line 240, in get_template
    return self._load(srcfile, uri)
  File "/data/asaba/hrs_trunk/tool/.virtualenvs/env1/lib/python2.4/site-packages/mako/lookup.py", line 305, in _load
    module_filename=module_filename,
  File "/data/asaba/hrs_trunk/tool/.virtualenvs/env1/lib/python2.4/site-packages/mako/template.py", line 291, in __init__
    module = self._compile_from_file(path, filename)
  File "/data/asaba/hrs_trunk/tool/.virtualenvs/env1/lib/python2.4/site-packages/mako/template.py", line 368, in _compile_from_file
    filename)
  File "/data/asaba/hrs_trunk/tool/.virtualenvs/env1/lib/python2.4/site-packages/mako/template.py", line 615, in _compile_text
    generate_magic_comment=template.disable_unicode)
  File "/data/asaba/hrs_trunk/tool/.virtualenvs/env1/lib/python2.4/site-packages/mako/template.py", line 597, in _compile
    node = lexer.parse()
  File "/data/asaba/hrs_trunk/tool/.virtualenvs/env1/lib/python2.4/site-packages/mako/lexer.py", line 241, in parse
    if self.match_python_block():
  File "/data/asaba/hrs_trunk/tool/.virtualenvs/env1/lib/python2.4/site-packages/mako/lexer.py", line 376, in match_python_block
    match.group(1)=='!', lineno=line, pos=pos)
  File "/data/asaba/hrs_trunk/tool/.virtualenvs/env1/lib/python2.4/site-packages/mako/lexer.py", line 131, in append_node
    node = nodecls(*args, **kwargs)
  File "/data/asaba/hrs_trunk/tool/.virtualenvs/env1/lib/python2.4/site-packages/mako/parsetree.py", line 139, in __init__
    self.code = ast.PythonCode(text, **self.exception_kwargs)
  File "/data/asaba/hrs_trunk/tool/.virtualenvs/env1/lib/python2.4/site-packages/mako/ast.py", line 42, in __init__
    f.visit(expr)
  File "/data/asaba/hrs_trunk/tool/.virtualenvs/env1/lib/python2.4/site-packages/mako/pyparser.py", line 320, in visit
    visitor.walk(expr, self)  # , walker=walker())
  File "/usr/lib64/python2.4/compiler/visitor.py", line 106, in walk
    walker.preorder(tree, visitor)
  File "/usr/lib64/python2.4/compiler/visitor.py", line 63, in preorder
    self.dispatch(tree, *args) # XXX *args make sense?
  File "/usr/lib64/python2.4/compiler/visitor.py", line 57, in dispatch
    return meth(node, *args)
  File "/usr/lib64/python2.4/compiler/visitor.py", line 40, in default
    self.dispatch(child, *args)
  File "/usr/lib64/python2.4/compiler/visitor.py", line 57, in dispatch
    return meth(node, *args)
  File "/usr/lib64/python2.4/compiler/visitor.py", line 40, in default
    self.dispatch(child, *args)
  File "/usr/lib64/python2.4/compiler/visitor.py", line 57, in dispatch
    return meth(node, *args)
  File "/data/asaba/hrs_trunk/tool/.virtualenvs/env1/lib/python2.4/site-packages/mako/pyparser.py", line 262, in visitFunction
    self._visit_function(node, args)
  File "/data/asaba/hrs_trunk/tool/.virtualenvs/env1/lib/python2.4/site-packages/mako/pyparser.py", line 276, in _visit_function
    self.local_ident_stack = local_ident_stack.union([
AttributeError: 'str' object has no attribute 'id'

I rendered template using some parameter pattern.
But error is not allways raised.

Please fix this bug.

@sqlalchemy-bot
Copy link
Author

Michael Bayer (@zzzeek) wrote:

f563f87

@sqlalchemy-bot
Copy link
Author

Changes by Michael Bayer (@zzzeek):

  • changed status to closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working caching low priority
Projects
None yet
Development

No branches or pull requests

1 participant