On Fri, Apr 11, 2008 at 4:54 AM, Cephire <[EMAIL PROTECTED]> wrote: > > Hello all: > I have the below in models.py > > class solForm(ModelForm): > """ > > """ > body = forms.CharField(max_length=150, > widget=forms.Textarea(attrs={'rows':2, 'cols': 40}),label= u'Your > Sol:') > author = forms.CharField(widget=forms.HiddenInput) > date = forms.CharField(widget=forms.HiddenInput) > group = forms.CharField(widget=forms.HiddenInput) > > class Meta: > model = sol > > This works fine. > > However when I try to package via cx_freeze and run the executable, it > throws the error as: > > Traceback (most recent call last): > File "C:\django_projects\initscripts\console.py", line 27, in > <module> > exec code in m.__dict__ > File "sol.py", line 7, in <module> > File "cool\sol\models.py", line 103, in <module> > File "cool\sol\models.py", line 107, in solForm > File "C:\Python25\lib\site-packages\django\newforms\fields.py", line > 129, in _ > _init__ > super(CharField, self).__init__(*args, **kwargs) > File "C:\Python25\lib\site-packages\django\newforms\fields.py", line > 70, in __ > init__ > self.help_text = smart_unicode(help_text or '') > File "C:\Python25\lib\site-packages\django\utils\encoding.py", line > 37, in sma > rt_unicode > return force_unicode(s, encoding, strings_only, errors) > File "C:\Python25\lib\site-packages\django\utils\encoding.py", line > 58, in for > ce_unicode > s = s.decode(encoding, errors) > LookupError: unknown encoding: utf-8 > > I'm lost. Any help to identify the problem and a possible resoultion? > > It would seem you have to explicitly tell cx_Freeze what encodings your program is going to need. See this thread on the cx-freeze-users mailing list:
http://sourceforge.net/mailarchive/forum.php?thread_name=aed435370803011441o54721ecfke10cc5f8db7abd3c%40mail.gmail.com&forum_name=cx-freeze-users Karen --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---