Oleg Broytmann a écrit : > Hi! > > On Sat, Aug 26, 2006 at 11:06:28PM +0200, sophana wrote: > >> I tried the following patch: In PickleValidator class >> >> def from_python(self, value, state): >> if value is None: >> return None >> - return pickle.dumps(value) >> + return pickle.dumps(value,protocol=self.pickleProtocol) >> >> I need that because without protocol 2, I cannot store sqlobjects in >> pickleCol... >> I know there is a workaround, but it would be cool to have that. >> >> However this does not work because when reading back the object, I get >> an error saying that the 'ascii' codec can't decode a specific byte. >> Seems that the pickleCol uses BlobCol and mysql returns unicode... >> >> SqlObject version is 0.7.0 >> > > Does it work with SQLObject 0.7.1 + the latest patches for MySQLdb+unicode? > > Oleg. > I removed all sqlobjects from my pickle cols. I will try to write a small test for that one day. I'm really very busy on my project. Sorry. However, storing sqlobjects inside a pickle col is not always a good idea. When you want to delete an object, you can't search in these pickled object if there is an occurence of it... I liked to do it because the schema evolution was difficult. Now with my small helper routine, I can add cols easily and even set a default value. I'm trying not to use pickle anymore.
------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ sqlobject-discuss mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss
