Hey.
I saw there are two def unicodeTest def's in test/db.py, so I renamed
second one to unicodeTest2.
running: python test/db.py SqliteTest.testUnicode
======================================================================
ERROR: Bug#177265: unicode queries throw errors
----------------------------------------------------------------------
Traceback (most recent call last):
  File "db.py", line 27, in testUnicode
    self.db.select('person', where='name=$name', vars={'name':
u'\xf4'})
  File "d:\python26\lib\site-packages\web.py-0.31-py2.6.egg\web
\db.py", line 617
, in select
    return self.query(qout, processed=True)
  File "d:\python26\lib\site-packages\web.py-0.31-py2.6.egg\web
\db.py", line 925
, in query
    out = DB.query(self, *a, **kw)
  File "d:\python26\lib\site-packages\web.py-0.31-py2.6.egg\web
\db.py", line 579
, in query
    self._db_execute(db_cursor, sql_query)
  File "d:\python26\lib\site-packages\web.py-0.31-py2.6.egg\web
\db.py", line 530
, in _db_execute
    for x in sql_query.values()])
ProgrammingError: You must not use 8-bit bytestrings unless you use a
text_facto
ry that can interpret 8-bit bytestrings (like text_factory = str). It
is highly
recommended that you instead just switch your application to Unicode
strings.

----------------------------------------------------------------------
Ran 1 test in 0.140s

FAILED (errors=1)

I see that this bug is already submited (Bug#177265). I read that
thread but it only mentions postgres, not sqlite.

On 6 Maj, 21:05, Anand Chitipothu <[email protected]> wrote:
> 2009/5/7 SeC <[email protected]>:
>
>
>
> > Trying to insert data that user enters in form. I think it's web.py
> > problem related, because I know it's working if I use sqlite3
> > directly, but i'm using web.database.
>
> SeC,
>
> test/db.py in webpy repository has method to test unicode insertions.
> Can you try to add your data there and see if you can make it fail?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to