Hi everybody.
I defined a model class, Book, whose field title may contain accented
letters.
But in the case, when the instruction save() is executed, I receive an
error saying that "You must not use 8-bit bytestrings unless you use a
text_factory that can interpret 8-bit bytestrings (like text_
22 alle 21:07:41 UTC+2 Antonis Christofides
ha scritto:
> Please provide the minimum code that reproduces the problem, and the full
> traceback.
>
> Regards,
>
> Antonis
>
>
> On 08/06/2022 18.24, Virgilio Ravagli wrote:
>
> ou must not use 8-bit bytestr
318. return Database.Cursor.execute(self, query, params)
Exception Type: ProgrammingError at /uti/dataLoading/
Exception Value: You must not use 8-bit bytestrings unless you use a
text_factory that can interpret 8-bit bytestrings (like text_factory =
str). It is highly recommended that you in
I'm bound to use old versions of Python and Django, cannot pass to newer
versions in this project
Il giorno venerdì 10 giugno 2022 alle 12:07:44 UTC+2 ajoeiam ha scritto:
> On Fri, Jun 10, 2022 at 2:50 AM Virgilio Ravagli
> wrote:
> >
> > I have surround book.save wit
return self.cursor.execute(sql, params)
> File "C:\Python27\lib\site-packages\django\db\backends\sqlite3\base.py" in
> execute
> 318. return Database.Cursor.execute(self, query, params)
>
> Exception Type: ProgrammingError at /uti/dataLoading/
> Exception Value
I found a way: book.title = titolo.decode('unicode_escape')
it works fine
Il giorno venerdì 10 giugno 2022 alle 21:45:46 UTC+2 Virgilio Ravagli ha
scritto:
> Thank you, Antonis, it works !
> book.title = u'Verità' doesn't give any errors.
>
> Just anot
6 matches
Mail list logo