Message92385
Here is the trackback (the uploaded file is a PDF file):
UnicodeDecodeError Python 3.1.1: /home/chu7/software/bin/python3
Mon Sep 7 12:31:07 2009
A problem occurred in a Python script. Here is the sequence of function
calls leading up to the error, in the order they occurred.
/home/chu7/web/cgi-bin/upload.py in ()
35 );
36 elif pathInfo == "/upload":
=> 37 fieldStorage = cgi.FieldStorage();
38 fileItem = fieldStorage["file"];
39 if fileItem.filename != "":
fieldStorage undefined, cgi = <module 'cgi'
from '/home/chu7/software/lib/python3.1/cgi.py'>, cgi.FieldStorage =
<class 'cgi.FieldStorage'>
/home/chu7/software/lib/python3.1/cgi.py in __init__(self=FieldStorage
(None, None, []), fp=None, headers={'content-length': '76784', 'content-
type': 'multipart/form-data; boundary=---------------------------
7d95563062a'}, outerboundary='', environ=<os._Environ object at
0x8ee040c>, keep_blank_values=0, strict_parsing=0)
489 self.read_urlencoded()
490 elif ctype[:10] == 'multipart/':
=> 491 self.read_multi(environ, keep_blank_values,
strict_parsing)
492 else:
493 self.read_single()
self = FieldStorage(None, None, []), self.read_multi = <bound method
FieldStorage.read_multi of FieldStorage(None, None, [])>, environ =
<os._Environ object at 0x8ee040c>, keep_blank_values = 0,
strict_parsing = 0
/home/chu7/software/lib/python3.1/cgi.py in read_multi
(self=FieldStorage(None, None, []), environ=<os._Environ object at
0x8ee040c>, keep_blank_values=0, strict_parsing=0)
609 # Create bogus content-type header for proper multipart
parsing
610 parser.feed('Content-Type: %s; boundary=%s\r\n\r\n' %
(self.type, ib))
=> 611 parser.feed(self.fp.read())
612 full_msg = parser.close()
613 # Get subparts
parser = <email.feedparser.FeedParser object at 0x910daac>, parser.feed
= <bound method FeedParser.feed of <email.feedparser.FeedParser object
at 0x910daac>>, self = FieldStorage(None, None, []), self.fp =
<_io.TextIOWrapper name='<stdin>' encoding='ANSI_X3.4-1968'>,
self.fp.read = <built-in method read of _io.TextIOWrapper object at
0x8ee833c>
/home/chu7/software/lib/python3.1/encodings/ascii.py in decode
(self=<encodings.ascii.IncrementalDecoder object at 0x8f6b74c>,
input=b'-----------------------------7d95563062a\r\nCo...\n-------------
----------------7d95563062a--\r\n', final=True)
24 class IncrementalDecoder(codecs.IncrementalDecoder):
25 def decode(self, input, final=False):
=> 26 return codecs.ascii_decode(input, self.errors)[0]
27
28 class StreamWriter(Codec,codecs.StreamWriter):
global codecs = <module 'codecs'
from '/home/chu7/software/lib/python3.1/codecs.py'>,
codecs.ascii_decode = <built-in function ascii_decode>, input = b'------
-----------------------7d95563062a\r\nCo...\n---------------------------
--7d95563062a--\r\n', self = <encodings.ascii.IncrementalDecoder object
at 0x8f6b74c>, self.errors = 'strict'
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc7 in position
158: ordinal not in range(128)
args = ('ascii', b'-----------------------------
7d95563062a\r\nCo...\n-----------------------------7d95563062a--\r\n',
158, 159, 'ordinal not in range(128)')
encoding = 'ascii'
end = 159
object = b'-----------------------------7d95563062a\r\nCo...\n----
-------------------------7d95563062a--\r\n'
reason = 'ordinal not in range(128)'
start = 158
with_traceback = <built-in method with_traceback of
UnicodeDecodeError object at 0x905bd2c> |
|
Date |
User |
Action |
Args |
2009-09-07 19:32:49 | loveminix | set | recipients:
+ loveminix, ezio.melotti |
2009-09-07 19:32:49 | loveminix | set | messageid: <1252351969.32.0.373994524514.issue6854@psf.upfronthosting.co.za> |
2009-09-07 19:32:47 | loveminix | link | issue6854 messages |
2009-09-07 19:32:47 | loveminix | create | |
|