pytz.timezone complains about Unicode data, expecting string

Issue #10 resolved
created an issue

I'm using Python 2.6.1, Django 1.2.5, and pytz 2011b on Mac OS X 10.6.6 -- I was following the "out of the box" instructions and using the built-in Django web server when I a Type error was thrown from line 388 in pytz.timezone was expecting a string instead of Unicode. For now I've fixed this by doing the following:

  1. Added the following line to

from django.utils.encoding import smart_str


  1. Updated line 388 in

pytz.timezone(smart_str(canonicalize(self.meta['zone'], TIME_ZONES)))

I could fork mango, fix this and submit a pull request, but I wasn't 100% sure that my logic or issue was sane.

Comments (2)

  1. Log in to comment