On Thu, 2006-30-11 at 14:28 +0100, Christoph Zwerschke wrote:
> Christopher Arndt schrieb:
> > Ha! I just got this error myself and, to be honest, it has nothing to do 
> > with
> > Apache and proxying.
> > 
> > There probably _is_ a difference between your production and testing system 
> > and
> > that is that 'kid' has been updated to version 0.9.4.
> > 
> > I did a:
> > 
> > easy_install -f http://www.kid-templating.org/dist/0.9.3/ "kid==0.9.3"
> > 
> > on my production box, restarted the server, e voilĂ !, everything works 
> > normal
> > again!
> > 
> > Probably should be filed as a bug with kid...
> 
> This probably happened because kid 0.9.3 templates need to be recompiled 
> before using kid 0.9.4 (see the release notes). You can do this very 
> simply by removing all *.pyc files from your templates directory. Let us 
> know whether this solves the problem.

I solved the problem, but I'm not sure which fix helped. I deleted
the .pyc files, and also fixed the base url filter thing in my app.cfg

At any rate, it got the templates working, thanks guys. 

Now onto the next problem, unicode and mysql! My dev box has mysql 5,
the prod has mysql 4. Gah! 

Getting data from the db is working fine, putting it in is having
problems. I have "spamalot".encode('utf8') on all my strings going in,
but this does not seem to work for enum columns and I don't know how to
get it to accept them.

I rebuilt the mysql tables as character set utf8, and the cols are
declared with Unicodecol(). The offending code line looks like this:

s = Sale( type="web", total=cart_list.total(), purchaser=p.id,
status="pending", sale_key=sale_key.encode('utf8') )

appending .encode('utf8') to "web" and "pending" doesn't seem to change
anything, and it works at home without it. I get the following
traceback:

File
"/usr/local/lib/python2.4/site-packages/SQLObject-0.7.2b1-py2.4.egg/sqlobject/col.py",
 line 921, in to_python
    (self.enumValues, self.name, value), value, state)
Invalid: expected a member of ('web', 'store', 'promo') in the EnumCol 'type', 
got Set(['web']) instead

I'm a real newbie to unicode and such, so maybe I'm doing something boneheaded. 
I do have control of the server
so we _could_ install mysql 5 alongside 4 if necessary ...

Thanks everyone,
Iain



--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to