EditBug:10105 Python error from tag contents
Jump to navigation
Jump to search
- EditBug:10105 Python error from tag contents OPEN A new editor submitted a magazine with the Tag set to "The World's Greatest Fantasy Magazine". On approval I got a Python error. See the details for the error. It says there's an error in the SQL syntax as apparently the embedded quote did not get escaped. Marc Kupper (talk) 23:45, 31 May 2007 (CDT)
Publication Update - SQL Statements SQL Updates: * insert into pubs(pub_title) values('xxx'); * update pubs set pub_title='The Poetic Knight, Vol. #1, Issue #8' where pub_id=195253 * update pubs set pub_tag='The World\'s Greatest Fantasy Magazine' where pub_id=195253 * update pubs set pub_tag='The World's Greatest Fantasy Magazine' where pub_id=195253 --> --> ProgrammingError Python 2.4.2: /usr/local/bin/python Thu May 31 23:41:28 2007 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/isfdb.tamu.edu/root/cgi-bin/mod/pa_new.cgi 471 print "<hr>" 472 473 Record = DoSubmission(db, submission) 474 475 print "<hr>" Record undefined, DoSubmission = <function DoSubmission>, db = <_mysql.connection open to 'localhost' at 832740c>, submission = 615973 /www/isfdb.tamu.edu/root/cgi-bin/mod/pa_new.cgi in DoSubmission(db=<_mysql.connection open to 'localhost' at 832740c>, submission=615973) 288 merge = doc.getElementsByTagName('NewPub') 289 UpdatePubColumn(merge, 'Title', 'pub_title', Record) 290 UpdatePubColumn(merge, 'Tag', 'pub_tag', Record) 291 UpdatePubColumn(merge, 'Year', 'pub_year', Record) 292 UpdatePubColumn(merge, 'Pages', 'pub_pages', Record) global UpdatePubColumn = <function UpdatePubColumn>, merge = [<DOM Element: NewPub at 0x840704c>], Record = 195253L /www/isfdb.tamu.edu/root/cgi-bin/mod/pa_new.cgi in UpdatePubColumn(doc=[<DOM Element: NewPub at 0x840704c>], tag="The World's Greatest Fantasy Magazine", column='pub_tag', id=195253L) 108 print "<li> ", update 109 if debug == 0: 110 db.query(update) 111 112 def UpdateTitleColumn(doc, tag, column, id): global db = <_mysql.connection open to 'localhost' at 832740c>, db.query = <built-in method query of Connection object>, update = "update pubs set pub_tag='The World's Greatest Fantasy Magazine' where pub_id=195253" ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 's Greatest Fantasy Magazine' where pub_id=195253' at line 1") args = (1064, "You have an error in your SQL syntax; check the ... Fantasy Magazine' where pub_id=195253' at line 1")