(img,))
>
>
thanks,but it still doesn't work
>
> > conn.commit()
>
> >
>
> > cursor.close()
>
> > conn.close()
>
> >
>
> > except mdb.Error as e:
>
> >
>
> > print ("Error
> but when I run it ,it gives the following error :
>
> Traceback (most recent call last):
> File "E:\Python\py32\itest4.py", line 20, in
> mdb.escape_string(img))
> UnicodeDecodeError: 'utf-8' codec can't decode byte 0x89 in position 0:
>
rror %d: %s" % (e.args[0],e.args[1]))
> sys.exit(1)
>
>
> I port it to python 3 ,and also change
> fin = open("chrome.png")
> to
> fin = open("Chrome_Logo.png",'rb')
> but when I run it ,it gives the following error :
>
> Traceba
wing error :
Traceback (most recent call last):
File "E:\Python\py32\itest4.py", line 20, in
mdb.escape_string(img))
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x89 in position 0: invalid
start byte
so how to fix it ?
--
Terry Jan Reedy
--
http://mail.python.org/mailman/listinfo/python-list
fin = open("Chrome_Logo.png",'rb')
but when I run it ,it gives the following error :
Traceback (most recent call last):
File "E:\Python\py32\itest4.py", line 20, in
mdb.escape_string(img))
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x89 in position 0: invalid
start byte
so how to fix it ?
--
http://mail.python.org/mailman/listinfo/python-list