firebird and unicode

Discussion in 'Python' started by flupke, May 22, 2005.

  1. flupke

    flupke Guest

    Hi,

    i'm developing an app that uses wxPython and Firebird via kinterbasdb on
    Win XP SP2. On insert of a record i get this error:
    (kinterbasdb.InterfaceError)
    (0, "Type mismatch: Input parameter for field named [name n
    ot known at this stage of query execution] must be a string, rather than
    a <type 'unicode'>.")

    Python, wxPython are all unicode enabled. The firebird database is
    created with the UNICODE_FSS charset and opened as such in kinterbasdb's
    connect function (charset=UNICODE). The GUI's charset is made with
    wxGlade and there i specified UTF-8 for the encoding.

    I'm out of ideas as to why i get this error message.

    Any ideas?

    Thanks
    Benedict
    flupke, May 22, 2005
    #1
    1. Advertising

  2. flupke

    flupke Guest

    flupke wrote:
    > Hi,
    >
    > i'm developing an app that uses wxPython and Firebird via kinterbasdb on
    > Win XP SP2. On insert of a record i get this error:
    > (kinterbasdb.InterfaceError)
    > (0, "Type mismatch: Input parameter for field named [name n
    > ot known at this stage of query execution] must be a string, rather than
    > a <type 'unicode'>.")
    >
    > Python, wxPython are all unicode enabled. The firebird database is
    > created with the UNICODE_FSS charset and opened as such in kinterbasdb's
    > connect function (charset=UNICODE). The GUI's charset is made with
    > wxGlade and there i specified UTF-8 for the encoding.
    >
    > I'm out of ideas as to why i get this error message.
    >
    > Any ideas?
    >
    > Thanks
    > Benedict


    If looked around a bit and it seems i have to do a
    kinterbasdb.init(type_conv=100). But this gives another error:

    File "C:\Python24\lib\site-packages\kinterbasdb\__init__.py", line 343,
    in init
    fakeFunc.func_code = realFunc.func_code
    ValueError: Date() requires a code object with 0 free vars, not 1

    I installd the mx Data time module and the fixedpoint module but that
    doesn't help. I still get the same error.
    Does anybody know what's wrong?

    Thanks,
    Benedict
    flupke, May 23, 2005
    #2
    1. Advertising

  3. flupke

    flupke Guest

    flupke wrote:
    <snip>

    I solved it by getting the latest py files from CVS and overwriting the
    existing ones. It gave an Attribute error but that was gone after
    commenting this line:
    #isc_info_isc_version = _k.isc_info_isc_version

    I'm not sure if this is a safe way of working. It's like jumping over a
    fence with barb wire. You know your balls might be in danger but
    sometimes you got to take a risk :)

    I hope i don't end up singing with a funny voice ;)

    Thanks,
    Benedict Verheyen
    flupke, May 23, 2005
    #3
  4. flupke

    F. Petitjean Guest

    Le Mon, 23 May 2005 09:30:31 GMT, flupke a écrit :
    > It's like jumping over a fence with barb wire.
    > You know your balls might be in danger but
    > sometimes you got to take a risk :)

    +1 QOTW

    >
    > I hope i don't end up singing with a funny voice ;)
    F. Petitjean, May 23, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tim Zych

    Textbox is tiny on Mozilla Firebird

    Tim Zych, Dec 22, 2003, in forum: ASP .Net
    Replies:
    3
    Views:
    489
    JiangZemin
    Dec 24, 2003
  2. saif

    IIS 5.1 and Mozilla Firebird

    saif, Feb 15, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    12,870
    Bernard
    Feb 17, 2004
  3. Fernando Grassi

    ODBC Java Firebird

    Fernando Grassi, Sep 3, 2004, in forum: Java
    Replies:
    2
    Views:
    2,535
    =?UTF-8?b?TMSByrtpZSBUZWNoaWU=?=
    Sep 3, 2004
  4. Andrew Cameron

    IE and Opera vs. Firebird

    Andrew Cameron, Sep 7, 2003, in forum: HTML
    Replies:
    12
    Views:
    629
    Andrew Cameron
    Sep 7, 2003
  5. pbjs

    RoR and Firebird

    pbjs, Jun 2, 2008, in forum: Ruby
    Replies:
    0
    Views:
    99
Loading...

Share This Page