[Tue Aug 27 13:02:57 2013] [error] [client 110.202.175.189] Error in
sys.excepthook:
[Tue Aug 27 13:02:57 2013] [error] [client 110.202.175.189]
ValueError: underlying buffer has been detached
[Tue Aug 27 13:02:57 2013] [error] [client 110.202.175.189]
[Tue Aug 27 13:02:57 2013] [error] [client 110.202.175.189] Original
exception was:
[Tue Aug 27 13:02:57 2013] [error] [client 110.202.175.189] Traceback
(most recent call last):
[Tue Aug 27 13:02:57 2013] [error] [client 110.202.175.189]   File
"/home/nikos/public_html/cgi-bin/metrites.py", line 169, in <module>
[Tue Aug 27 13:02:57 2013] [error] [client 110.202.175.189]
cur.execute('''SELECT ID FROM counters WHERE url = %s''', page )
[Tue Aug 27 13:02:57 2013] [error] [client 110.202.175.189]   File

"/usr/local/bin/python/lib/python3.3/site-packages/pymysql/cursors.py",
line 108, in execute
[Tue Aug 27 13:02:57 2013] [error] [client 110.202.175.189]     query
= query % escaped_args
[Tue Aug 27 13:02:57 2013] [error] [client 110.202.175.189]
TypeError: unsupported operand type(s) for %: 'bytes' and 'str'

I quote from a Python 3 Guide [http://python.about.com/od/python30/ss/30_strings_3.htm]:

The two data types, str and bytes, are mutually exclusive. One cannot legally combine them into one call. With the distinction between text and data, therefore, comes the need to convert between them.


--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to