DisplayBug:20081 Python error on an ASIN
Jump to navigation
Jump to search
- DisplayBug:20081 Python error on an ASIN OPEN It looks like this publication has an Amazon ASIN (not my doing) and the isbn13 display blew up. Marc Kupper 03:11, 4 Jan 2007 (CST)
Publication Listing picture * Title: Sunfall * Authors: C. J. Cherryh * Year: 1981-00-00 * ISBN-10: B000BKRV38 --> --> ValueError Python 2.4.2: /usr/local/bin/python Thu Jan 4 03:06:59 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/pl.cgi 343 if len(publication[PUB_ISBN]) == 10: 344 print ' <li><b>ISBN-10:</b>', convertISBN(publication[PUB_ISBN]) 345 isbn = isbn13(publication[PUB_ISBN]) 346 print ' <li><b>ISBN-13:</b>', convertISBN(isbn) 347 elif len(publication[PUB_ISBN]) == 13: isbn undefined, isbn13 = <function isbn13>, publication = (82857L, 'Sunfall', 'SNFLLJRKRX1981', '1981-00-00', 2291L, None, 'hc', 'NOVEL', 'B000BKRV38', 'http://images.amazon.com/images/P/B000BKRV38.01.LZZZZZZZ.jpg', None, None), PUB_ISBN = 8 /www/isfdb.tamu.edu/root/cgi-bin/pl.cgi in isbn13(isbn='B000BKRV38') 255 newISBN = '978' + isbn[0:9] 256 257 sum1 = int(newISBN[0]) + int(newISBN[2]) + int(newISBN[4]) + int(newISBN[6]) + int(newISBN[8]) + int(newISBN[10]) 258 sum2 = int(newISBN[1]) + int(newISBN[3]) + int(newISBN[5]) + int(newISBN[7]) + int(newISBN[9]) + int(newISBN[11]) 259 checksum = sum1 + (sum2 * 3) sum1 undefined, builtin int = <type 'int'>, newISBN = '978B000BKRV3' ValueError: invalid literal for int(): K args = ('invalid literal for int(): K',)