eudicots / Cactus

Static site generator for designers. Uses Python and Django templates.
BSD 3-Clause "New" or "Revised" License
3.46k stars 314 forks source link

UniCodeWarning for Django package #221

Closed ghost closed 8 years ago

ghost commented 8 years ago

building my site on OS X gives me the following django related warning:

/Library/Python/2.7/site-packages/django/template/smartif.py:103: UnicodeWarning: Unicode unequal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
  '!=': infix(10, lambda context, x, y: x.eval(context) != y.eval(context)),

consider updating django?

krallin commented 8 years ago

Not entirely sure updating Django would solve your issue here. Do you have reason to believe it would? Can you clarify why?

Do you have the template code that generated the warning? This issue is probably due to comparing a unicode string with a regular str (the latter might be an internal string coming from Cactus).

Note that Cactus now supports Python 3, updating to Python 3 might solve that problem (since the internal strings would be unicode).

ghost commented 8 years ago

Everything is fine. Just noticed a german umlaut in a template name. Sorry!