Thanks Karen. It helped. But I got another error. AttributeError: 'module' object has no attribute 'admin'. Searching through the net, I found that __init.py__ should be present in the directory. It does have __init.py__.
Should all directories (like media, templates) have __init.py__? As I said before, this works fine in development (using the django server) and production server too(apache+mod_python). Thank you, Joseph On Apr 11, 5:02 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > 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=aed435370803... > > 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 -~----------~----~----~----~------~----~------~--~---