Edgewall Software

Ticket #256 (new defect)

Opened 5 months ago

Last modified 5 months ago

incorrect undefined variable

Reported by: wichert@… Owned by: cmlenz
Priority: major Milestone: 0.6
Component: General Version: 0.5.1
Keywords: Cc:

Description

This template snippet:

<blockquote py:with="quote=h.quote()">
  <strong py:attrs="dict(style=quote['style'])">"${quote["quote"]}"</strong>
  <em>${quote["author"]}</em>
</blockquote>

produces this traceback when rendered:

File 'build/bdist.macosx-10.3-fat/egg/genshi/core.py', line 154 in render
File 'build/bdist.macosx-10.3-fat/egg/genshi/output.py', line 45 in encode
File 'build/bdist.macosx-10.3-fat/egg/genshi/output.py', line 274 in __call__
File 'build/bdist.macosx-10.3-fat/egg/genshi/output.py', line 519 in __call__
File 'build/bdist.macosx-10.3-fat/egg/genshi/output.py', line 679 in __call__
File 'build/bdist.macosx-10.3-fat/egg/genshi/output.py', line 459 in __call__
File 'build/bdist.macosx-10.3-fat/egg/genshi/core.py', line 212 in _ensure
File 'build/bdist.macosx-10.3-fat/egg/genshi/template/markup.py', line 252 in _include
File 'build/bdist.macosx-10.3-fat/egg/genshi/template/markup.py', line 297 in _match
File 'build/bdist.macosx-10.3-fat/egg/genshi/template/markup.py', line 242 in _exec
File 'build/bdist.macosx-10.3-fat/egg/genshi/template/base.py', line 421 in _eval
File 'build/bdist.macosx-10.3-fat/egg/genshi/template/eval.py', line 136 in evaluate
File '/local/simplon/2style4you/code/buildout/devel/src/tostyle4you/tostyle4you/templates/retailer/clothing_add.html', line 69 in <Expression u"quote['quote']">
  <strong py:attrs="dict(style=quote['style'])">${quote['quote']}</strong>
File 'build/bdist.macosx-10.3-fat/egg/genshi/template/eval.py', line 281 in lookup_item
File 'build/bdist.macosx-10.3-fat/egg/genshi/template/eval.py', line 236 in _die
UndefinedError: "quote" not defined

}}}

Attachments

Change History

Changed 5 months ago by wichert@…

  • version changed from 0.4.4 to 0.5.1

Genshi 0.5.1 has the same result as 0.4.4.

Add/Change #256 (incorrect undefined variable)

Author



Change Properties
<Author field>
Action
as new
as The resolution will be set. Next status will be 'closed'
to The owner will change from cmlenz. Next status will be 'new'
The owner will change from cmlenz to anonymous. Next status will be 'assigned'
 
Note: See TracTickets for help on using tickets.