ISFDB banner

Add Variant Title

--> -->
 
 
<type 'exceptions.TypeError'>
Python 2.7.18: /usr/bin/python
Mon May 29 13:53:26 2023

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

 /var/www/cgi-bin/edit/addvariant.cgi in <module>()
     57 
     58         PrintPreSearch('Add Variant Title')
=>   59         PrintNavBar('edit/addvariant.cgi', title_id)
     60         
     61         print('<div id="HelpBox">')
PrintNavBar = <function PrintNavBar>, title_id = 2174896
 /var/www/cgi-bin/edit/isfdblib.py in PrintNavBar(executable='edit/addvariant.cgi', arg=2174896)
    196                                         'submitver', 'edittags', 'cleanup', 'cleanup_report',
    197                                         'find_dups', 'find_pub_dups', 'keygen'))
=>  198             and (SQLWikiEditCount(username) < SESSION.new_editor_threshold)
    199             and (SQLCountPendingSubsForUser(userid) > SESSION.max_new_editor_submissions)):
    200                 print("""<h2>You currently have %d pending submissions, more than the limit for new editors.
global SQLWikiEditCount = <function SQLWikiEditCount>, username = 0, global SESSION = <isfdb.Session object>, SESSION.new_editor_threshold = 20
 /var/www/cgi-bin/edit/SQLparsing.py in SQLWikiEditCount(submitter=0)
   2349         # Retrieve the count of Wiki edits by a submitter
   2350         CNX = MYSQL_CONNECTOR()
=> 2351         query = "select user_editcount from mw_user where user_name='%s'" % (CNX.DB_ESCAPE_STRING(submitter))
   2352         CNX.DB_QUERY(query)
   2353         record = CNX.DB_FETCHONE()
query undefined, CNX = <SQLparsing.MYSQL_CONNECTOR instance>, CNX.DB_ESCAPE_STRING = <bound method MYSQL_CONNECTOR.DB_ESCAPE_STRING of <SQLparsing.MYSQL_CONNECTOR instance>>, submitter = 0
 /var/www/cgi-bin/edit/SQLparsing.py in DB_ESCAPE_STRING(self=<SQLparsing.MYSQL_CONNECTOR instance>, target=0)
    112         def DB_ESCAPE_STRING(self, target):
    113                 if db_connector == db_python2:
=>  114                         return db.escape_string(target)
    115                 elif db_connector == db_python3:
    116                         return db.converter.escape(target)
global db = <_mysql.connection open to 'localhost'>, db.escape_string = <built-in method escape_string of Connection object>, target = 0

<type 'exceptions.TypeError'>: escape_string() argument 1 must be string or read-only buffer, not int
      args = ('escape_string() argument 1 must be string or read-only buffer, not int',)
      message = 'escape_string() argument 1 must be string or read-only buffer, not int'