Re: UnicodeDecodeError with memcache

2007-08-29 Thread Iapain
> patrickk, I'm not sure what lapain's experience with unicode is, but > please disregard the advice to switch defaultencoding to utf-8. I didnt want this either, but some time you have to toil a bit for debugging. I suggested him to use smart_str in post1, because i am aware of recently merger

Re: UnicodeDecodeError with memcache

2007-08-29 Thread patrickk
I´ll do a django-update on the weekend. If the problem still exists, I´ll post here again. Thanks for the answers, Patrick On 29 Aug., 17:06, patrickk <[EMAIL PROTECTED]> wrote: > I´m on revision 5646 > > On 29 Aug., 16:57, "Jeremy Dunck" <[EMAIL PROTECTED]> wrote: > > > On 8/29/07, Michael

Re: UnicodeDecodeError with memcache

2007-08-29 Thread patrickk
I´m on revision 5646 On 29 Aug., 16:57, "Jeremy Dunck" <[EMAIL PROTECTED]> wrote: > On 8/29/07, Michael Radziej <[EMAIL PROTECTED]> wrote: > > > > > > > On Wed, Aug 29, patrickk wrote: > > > > I just changed > > > self._cache.set(key, value, timeout or self.default_timeout) > > > to > > >

Re: UnicodeDecodeError with memcache

2007-08-29 Thread Jeremy Dunck
On 8/29/07, Michael Radziej <[EMAIL PROTECTED]> wrote: > > On Wed, Aug 29, patrickk wrote: > > > > > I just changed > > self._cache.set(key, value, timeout or self.default_timeout) > > to > > self._cache.set(smart_str(key), value, timeout or > > self.default_timeout) > > in memcached.py > > and

Re: UnicodeDecodeError with memcache

2007-08-29 Thread Michael Radziej
On Wed, Aug 29, patrickk wrote: > > I just changed > self._cache.set(key, value, timeout or self.default_timeout) > to > self._cache.set(smart_str(key), value, timeout or > self.default_timeout) > in memcached.py > and it seems to work. > > Don´t know if that´s a proper solution though. Me

Re: UnicodeDecodeError with memcache

2007-08-29 Thread patrickk
I just changed self._cache.set(key, value, timeout or self.default_timeout) to self._cache.set(smart_str(key), value, timeout or self.default_timeout) in memcached.py and it seems to work. Don´t know if that´s a proper solution though. thanks, patrick On Aug 29, 10:32 am, Michael Radziej

Re: UnicodeDecodeError with memcache

2007-08-29 Thread Michael Radziej
On Wed, Aug 29, patrickk wrote: > instead of sending the whole stack, it´s probably easier to just check > it yourself: > http://skip.dedhost-sil-076.sil.at/trailer/ File "/usr/lib/python2.4/site-packages/memcache.py" in _set 328. fullcmd = "%s %s %d %d %d\r\n%s" % (cmd, key, flags, time,

Re: UnicodeDecodeError with memcache

2007-08-29 Thread patrickk
thanks jeremy. here´s the information: CACHE_BACKEND = 'memcached://dedhost-sil-076.sil.at:11211/' I´m not using the cache_middleware, because I´m using the per-view- cache. Just re-checked the django-docs and hope I don´t misunderstand the whole caching-thing - but according to the docs, the

Re: UnicodeDecodeError with memcache

2007-08-28 Thread Jeremy Dunck
On 8/28/07, patrickk <[EMAIL PROTECTED]> wrote: > > additional information: > I just checked the default encoding > > >>> import sys > >>> sys.getdefaultencoding() > 'ascii' > > should that be something different (like utf-8)? > btw: all our data (database) and scripts are encoded with utf-8.

Re: UnicodeDecodeError with memcache

2007-08-28 Thread Jeremy Dunck
On 8/27/07, patrickk <[EMAIL PROTECTED]> wrote: > > With using the cache_page decorator, I´m getting a Unicode Error on my > page: > > UnicodeDecodeError at /spezialprogramme/ > 'ascii' codec can't decode byte 0x80 in position 0: ordinal not in > range(128) > patrickk, please give your whole

Re: UnicodeDecodeError with memcache

2007-08-28 Thread Iapain
What middleware you are using .. any external middleware? On Aug 28, 12:27 pm, patrickk <[EMAIL PROTECTED]> wrote: > why prefer latin1 over utf-8 (in settings.py)? > > On 28 Aug., 09:12, Iapain <[EMAIL PROTECTED]> wrote: > > > > >>> import sys > > > >>> sys.getdefaultencoding() > > > > 'ascii' >

Re: UnicodeDecodeError with memcache

2007-08-28 Thread patrickk
why prefer latin1 over utf-8 (in settings.py)? On 28 Aug., 09:12, Iapain <[EMAIL PROTECTED]> wrote: > > >>> import sys > > >>> sys.getdefaultencoding() > > > 'ascii' > > Try using utf-8, btw it shouldnt be a problem. Lastly try using > changing charset to latin1 in your settings.py .. I guess

Re: UnicodeDecodeError with memcache

2007-08-28 Thread Iapain
> >>> import sys > >>> sys.getdefaultencoding() > > 'ascii' Try using utf-8, btw it shouldnt be a problem. Lastly try using changing charset to latin1 in your settings.py .. I guess your website is not in english .. or it has some non-ascii char.

Re: UnicodeDecodeError with memcache

2007-08-28 Thread patrickk
additional information: I just checked the default encoding >>> import sys >>> sys.getdefaultencoding() 'ascii' should that be something different (like utf-8)? btw: all our data (database) and scripts are encoded with utf-8. thanks, patrick On 28 Aug., 08:21, patrickk <[EMAIL PROTECTED]>

Re: UnicodeDecodeError with memcache

2007-08-28 Thread patrickk
I´m sorry for bothering again, but our site has to be online soon and I ´m currently not able to use the cache_page decorator (which makes me a bit nervous). I did some research on smart_str, but I don´t know how and where to use it and I also don´t see why this should solve the problem. any

Re: UnicodeDecodeError with memcache

2007-08-27 Thread patrickk
so you say I should use __str__ instead of __unicode__, right? according to the django-docs, that´s not recommended though ... On 27 Aug., 16:40, Iapain <[EMAIL PROTECTED]> wrote: > > UnicodeDecodeError at /spezialprogramme/ > > 'ascii' codec can't decode byte 0x80 in position 0: ordinal not in

Re: UnicodeDecodeError with memcache

2007-08-27 Thread Iapain
> UnicodeDecodeError at /spezialprogramme/ > 'ascii' codec can't decode byte 0x80 in position 0: ordinal not in > range(128) try using smart_str, it it doesnt work then use less restrictive decode --~--~-~--~~~---~--~~ You received this message because you are

UnicodeDecodeError with memcache

2007-08-27 Thread patrickk
With using the cache_page decorator, I´m getting a Unicode Error on my page: UnicodeDecodeError at /spezialprogramme/ 'ascii' codec can't decode byte 0x80 in position 0: ordinal not in range(128) Any ideas? Thanks, Patrick --~--~-~--~~~---~--~~ You received