Index: django/forms/forms.py
===================================================================
--- django/forms/forms.py	(revision 8752)
+++ django/forms/forms.py	(working copy)
@@ -371,7 +371,7 @@
         """
         contents = contents or escape(self.label)
         widget = self.field.widget
-        id_ = widget.attrs.get('id') or self.auto_id
+        id_ = smart_unicode(widget.attrs.get('id', '')) or self.auto_id
         if id_:
             attrs = attrs and flatatt(attrs) or ''
             contents = '<label for="%s"%s>%s</label>' % (widget.id_for_label(id_), attrs, contents)
