EditBug:10072 ISBN validator blow up
Revision as of 05:42, 27 December 2006 by Marc Kupper (talk | contribs)
- EditBug:10072 ISBN validator blow up OPEN I wanted to change this pub from a Novel to Anthology and got the following error. As a temporary fix I changed the ISBN from 075640410X to 075640410X-xxxx so the validator code would not try to process it. See the bug notes for the python details. Marc Kupper 03:42, 27 Dec 2006 (CST)
ValueError Python 2.4.2: /usr/local/bin/python Wed Dec 27 03:37:37 2006 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/edit/submitpub.cgi 74 75 new = pubs(db) 76 new.cgi2obj() 77 78 old = pubs(db) new = <pubClass.pubs instance>, new.cgi2obj = <bound method pubs.cgi2obj of <pubClass.pubs instance>> /www/isfdb.tamu.edu/root/cgi-bin/edit/pubClass.py in cgi2obj(self=<pubClass.pubs instance>) 686 if self.form.has_key('pub_isbn'): 687 self.pub_isbn = self.form['pub_isbn'].value 688 if validISBN(self.pub_isbn): 689 self.pub_isbn = string.replace(self.pub_isbn, '-', '') 690 self.pub_isbn = string.replace(self.pub_isbn, ' ', '') global validISBN = <function validISBN>, self = <pubClass.pubs instance>, self.pub_isbn = '075640410X' /www/isfdb.tamu.edu/root/cgi-bin/edit/pubClass.py in validISBN(isbn='075640410X') 34 remain = sum % 11 35 if remain == 10: 36 if int(isbn[9]) != 'X': 37 return 0 38 else: builtin int = <type 'int'>, isbn = '075640410X' ValueError: invalid literal for int(): X args = ('invalid literal for int(): X',)