<type 'exceptions.UnicodeEncodeError'> | Python 2.5.2: /Library/Frameworks/Python.framework/Versions/2.5/Resources/Python.app/Contents/MacOS/Python Sun Jun 4 11:59:47 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.
/Library/WebServer/Documents/etc/search.py in |
246 |
247 if __name__ == '__main__': |
248 html = main(q, author, page) |
249 generate_cache_file(q, author, page, html) |
250 print "Content-Type: text/html" |
html undefined, main = <function main at 0x1515ab0>, q = u'Q\ufffd\ufffdt\ufffd\ufffd', author = u'', page = 1 |
/Library/WebServer/Documents/etc/search.py in main(q=u'Q\ufffd\ufffdt\ufffd\ufffd', author=u'', page=1) |
104 print "Content-Type: text/html" |
105 print |
106 print html.encode('utf-8') % parameters |
107 exit(0) |
108 |
html = u'<!DOCTYPE html>\n<html lang="nl">\n<head>\n\t<meta h...i></p>\n \t<br />\n </div>\n\n</div>\n</body>\n</html>', html.encode = <built-in method encode of unicode object at 0x1197b78>, parameters = {u'script': u'', u'searchresults': u'', u'summary': u'<div class="grid_12">\nGeen documenten gevonden!\n</div>', u'title': u"'Q\ufffd\ufffdt\ufffd\ufffd'"} |
<type 'exceptions.UnicodeEncodeError'>: 'ascii' codec can't encode characters in position 121-122: ordinal not in range(128)
args =
('ascii', u'<!DOCTYPE html>\n<html lang="nl">\n<head>\n\t<meta h...i></p>\n \t<br />\n </div>\n\n</div>\n</body>\n</html>', 121, 123, 'ordinal not in range(128)')
encoding =
'ascii'
end =
123
message =
''
object =
u'<!DOCTYPE html>\n<html lang="nl">\n<head>\n\t<meta h...i></p>\n \t<br />\n </div>\n\n</div>\n</body>\n</html>'
reason =
'ordinal not in range(128)'
start =
121