PYTHON - unknown error?

Przepióra Jacek J.Przepiora at stat.gov.pl
Tue Dec 31 10:20:16 CET 2002


<!-- UWAGA: czysty belkot bez polskich znakow diakrytycznych --> 
viTAM!
Po wpisaniu do okienka (chyba wyszukiwarki ? ;
url:="http://lists.pld-linux.org/")
	"su root"

otrzymalem w przegladarce taki tekst: 

A problem occurred in a Python script. Here is the sequence of function
calls leading up to the error, in the order they occurred.

 /www/lists.pld/index/s.cgi
   47 table = "pld"+form["listno"].value
   48 
   49 askforit(table, form["query"].value, form["listno"].value)
   50 
   51 #debug on:
askforit = <function askforit>, table = 'pld33', form = FieldStorage(None,
None, [FieldStorage('query', ..."su root"'), FieldStorage('listno', None,
'33')]), ].value = [FieldStorage('query', None, '"su root"'),
FieldStorage('listno', None, '33')]

 /www/lists.pld/index/s.cgi in askforit(table='pld33', query='"su root"',
mss='33')
   24         kursor = db.cursor()
   25         # SELECT * FROM articles WHERE MATCH (title,body) AGAINST
('database');
   26         kursor.execute('SELECT author,subject,mss,MATCH
(author,subject,body) AGAINST ("%s") AS score FROM %s WHERE MATCH
(author,subject,body) AGAINST ("%s") ' % (query, table, query))
   27         results = kursor.fetchall()
   28         kursor.close()
kursor = <MySQLdb.cursors.Cursor instance>, kursor.execute = <bound method
Cursor.execute of <MySQLdb.cursors.Cursor instance at 0x8239d94>>, query =
'"su root"', table = 'pld33'

 /usr/lib/python2.2/site-packages/MySQLdb/cursors.py in
execute(self=<MySQLdb.cursors.Cursor instance>, query='SELECT
author,subject,mss,MATCH (author,subject,...ATCH (author,subject,body)
AGAINST (""su root"") ', args=None)
   59         from types import ListType, TupleType
   60         if args is None:
   61             r = self._query(query)
   62         elif type(args) is ListType and type(args[0]) is TupleType:
   63             r = self.executemany(query, args) # deprecated
r undefined, self = <MySQLdb.cursors.Cursor instance>, self._query = <bound
method Cursor._query of <MySQLdb.cursors.Cursor instance at 0x8239d94>>,
query = 'SELECT author,subject,mss,MATCH (author,subject,...ATCH
(author,subject,body) AGAINST (""su root"") '

 /usr/lib/python2.2/site-packages/MySQLdb/cursors.py in
_query(self=<MySQLdb.cursors.Cursor instance>, q='SELECT
author,subject,mss,MATCH (author,subject,...ATCH (author,subject,body)
AGAINST (""su root"") ')
  166 
  167     def _query(self, q):
  168         rowcount = self._BaseCursor__do_query(q)
  169         self._rows = self._result and self._fetch_row(0) or ()
  170         self._pos = 0
rowcount undefined, self = <MySQLdb.cursors.Cursor instance>,
self._BaseCursor__do_query = <bound method Cursor.__do_query of
<MySQLdb.cursors.Cursor instance at 0x8239d94>>, q = 'SELECT
author,subject,mss,MATCH (author,subject,...ATCH (author,subject,body)
AGAINST (""su root"") '

 /usr/lib/python2.2/site-packages/MySQLdb/cursors.py in
__do_query(self=<MySQLdb.cursors.Cursor instance>, q='SELECT
author,subject,mss,MATCH (author,subject,...ATCH (author,subject,body)
AGAINST (""su root"") ')
  110         from string import split, atoi
  111         db = self._get_db()
  112         db.query(q)
  113         self._result = self._get_result()
  114         self.rowcount = db.affected_rows()
db = <open connection to 'mysql.metalab.unc.edu' at 8203c50>, db.query =
<built-in method query of connection object>, q = 'SELECT
author,subject,mss,MATCH (author,subject,...ATCH (author,subject,body)
AGAINST (""su root"") '

OperationalError: (2000, 'You have an error in your SQL syntax near \'su
root"") AS score FROM pld33 WHERE MATCH (author,subject,body) AGAINST (""su
r\' at line 1')
      __doc__ = 'Exception raised for errors that are related to ...cation\n
error occurred during processing, etc.'
      __getitem__ = <bound method OperationalError.__getitem__ of
<_...ceptions.OperationalError instance at 0x8239f14>>
      __init__ = <bound method OperationalError.__init__ of
<_mys...ceptions.OperationalError instance at 0x8239f14>>
      __module__ = '_mysql_exceptions'
      __str__ = <bound method OperationalError.__str__ of
<_mysq...ceptions.OperationalError instance at 0x8239f14>>
      args = (2000, 'You have an error in your SQL syntax near \'su ro...
(author,subject,body) AGAINST (""su r\' at line 1')



Poztrawiam 
coturnix



More information about the feedback mailing list