Re: [pysqlite] test.test() error on osX using python2.5.4

Jan Neumann <[email protected]> Fri, 24 Jul 2009 15:45:48 +0200
Newsgroups gmane.comp.python.db.pysqlite.user
Message-ID <[email protected]>
Hello Gerhard

Thanks for your swift reply!

Yes, in my sitecustomize.py there is the line

	sys.setdefaultencoding("utf-8")


But, if I change this to

	sys.setdefaultencoding("ascii")

, the error is non the less raised. And in my site.py encoding is set  =

to "ascii" by default.



If i use

	import sys
	sys.setdefaultencoding("ascii")

in the python console, I get

	Traceback (most recent call last):
	File "<stdin>", line 1, in <module>
	AttributeError: 'module' object has no attribute 'setdefaultencoding'


How could I change this? Or does pysqlite work with utf-8, too?

ciao Jan


On 24.07.2009, at 14:54, Gerhard H=E4ring wrote:

> Jan Neumann wrote:
>> Hello everybody,
>>
>> I just installed pysqlite-2.5.5 withour error (for the first time).
>>
>> Trying the test.test() routine I got 2 Errors.
>>
>> The first error is declared as everything is fine, it's just a mac (http=
://osdir.com/ml/python.db.pysqlite.user/2008-05/msg00003.html
>> )
>> So I don't worry much about it.
>
> Yes, this is still OS X mistery to me - I couldn't reproduce it there.
>
>>
>> But what can I do against the second Failure (FAIL:
>> CheckSetIsolationLevel) ?
>>
>> here is the output:
>>
>> Python 2.5.4 (r254:67917, Dec 23 2008, 14:57:27)
>> [GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin
>>
>>>>> from pysqlite2 import test
>>>>> test.test()
>> ........................................................................=
...........................................................................=
.............................................F
>> ....F.........
>> =3D =

>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>> FAIL: CheckOnConflictRollback
>> (pysqlite2.test.regression.RegressionTests)
>> ----------------------------------------------------------------------
>> Traceback (most recent call last):
>>   File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
>> python2.5/site-packages/pysqlite2/test/regression.py", line 101, in
>> CheckOnConflictRollback
>>     self.fail("pysqlite knew nothing about the implicit ROLLBACK")
>> AssertionError: pysqlite knew nothing about the implicit ROLLBACK
>
> No idea. Sorry.
>
>>
>> =3D =

>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>> FAIL: CheckSetIsolationLevel  =

>> (pysqlite2.test.regression.RegressionTests)
>> ----------------------------------------------------------------------
>> Traceback (most recent call last):
>>   File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
>> python2.5/site-packages/pysqlite2/test/regression.py", line 158, in
>> CheckSetIsolationLevel
>>     "isolation_level", u"\xe9")
>> AssertionError: UnicodeEncodeError not raised [...]
>
> Now this sounds fishy. Have you sinned and changed Python's default
> encoding from ASCII to something else in sitecustomize.py?
>
> -- Gerhard
> _______________________________________________
> list-pysqlite mailing list
> list-pysqlite-FR6EJeJVuqdwc357pe9rcyQmJico6nz3epZhswDD4dQ@public.gmane.org
> http://itsystementwicklung.de/cgi-bin/mailman/listinfo/list-pysqlite