Subject | Re: [firebird-python] next driver version |
---|---|
Author | Hajime Nakagami |
Post date | 2010-10-26T15:04:02Z |
Hi
Can you execute without 3to2 at version of 0.2 ?
2010/10/26 Werner F. Bruhin <werner.bruhin@...>
Hi,
I just gave version 0.2 a try.
On 21/10/2010 10:55, Hajime Nakagami wrote:
>> Quickly looking at the doc the module "struct" it looks like it has the
>> same functionality from Py 2.5+ to Py 3.2.
> Thaks so much.
>
> I will try later (this week end)
>
- run it through 3to2
- changed the import "from firebirdsql.fberrmsgs import messages" to
"from fberrmsgs import messages"
and it runs!
- it created the test database, and the table and some more
But it fails on this "conn.cursor().execute(u"update foo set c=? where
a=2", [u'Nakagami'])" with the following exception.
Traceback (most recent call last):
File "fbcore.py", line 1245, in <module>
conn.cursor().execute(u"update foo set c=? where a=2", [u'Nakagami'])
File "fbcore.py", line 558, in execute
self.connection._op_execute(self.stmt_handle, params)
File "fbcore.py", line 912, in _op_execute
p.pack_bytes(blr)
File "C:\Python27\lib\xdrlib.py", line 92, in pack_string
self.pack_fstring(n, s)
File "C:\Python27\lib\xdrlib.py", line 85, in pack_fstring
self.__buf.write(data)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xff' in
position 11: ordinal not in range(128)
I also see the following output:
dsn=
localhost:C:\dev\firebirdNewDriver\pyfirebirdsql2.0\firebirdsql/test.fdb
[u'\x0b\x00\x00\x00', u'\x02\x00\x00\x00', u'\x06SYSDBA']
Any hint of what is the correct way to fix this?
Werner