TypeError
Python 3.0: G:\cgi\python\python.exe
Thu Jan 15 19:52:27 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.

 G:\webserver\xampp\cgi-bin\testupload.py in ()
  103 
  104 # get form
  105 opsform = cgi.FieldStorage(open(sys.stdin.fileno(), 'rb'))
  106 
  107 print ("<br>","form-data:","<br>",opsform,"<br>")
opsform undefined, cgi = <module 'cgi' from 'G:\cgi\python\lib\cgi.py'>, cgi.FieldStorage = <class 'cgi.FieldStorage'>, builtin open = <class 'io.OpenWrapper'>, sys = <module 'sys' (built-in)>, sys.stdin = <io.TextIOWrapper object at 0x00BE3FB0>, sys.stdin.fileno = <bound method TextIOWrapper.fileno of <io.TextIOWrapper object at 0x00BE3FB0>>
 G:\cgi\python\lib\cgi.py in __init__(self=FieldStorage(None, None, []), fp=<io.BufferedReader object at 0x00DD51B0>, headers={'content-length': '184552', 'content-type': 'multipart/form-data; boundary=---------------------------7d91f41a302f4'}, outerboundary='', environ=<os._Environ object at 0x00C90C10>, keep_blank_values=0, strict_parsing=0)
  477             self.read_urlencoded()
  478         elif ctype[:10] == 'multipart/':
  479             self.read_multi(environ, keep_blank_values, strict_parsing)
  480         else:
  481             self.read_single()
self = FieldStorage(None, None, []), self.read_multi = <bound method FieldStorage.read_multi of FieldStorage(None, None, [])>, environ = <os._Environ object at 0x00C90C10>, keep_blank_values = 0, strict_parsing = 0
 G:\cgi\python\lib\cgi.py in read_multi(self=FieldStorage(None, None, []), environ=<os._Environ object at 0x00C90C10>, keep_blank_values=0, strict_parsing=0)
  597         # Create bogus content-type header for proper multipart parsing
  598         parser.feed('Content-Type: %s; boundary=%s\r\n\r\n' % (self.type, ib))
  599         parser.feed(self.fp.read())
  600         full_msg = parser.close()
  601         # Get subparts
parser = <email.feedparser.FeedParser object at 0x00DD5250>, parser.feed = <bound method FeedParser.feed of <email.feedparser.FeedParser object at 0x00DD5250>>, self = FieldStorage(None, None, []), self.fp = <io.BufferedReader object at 0x00DD51B0>, self.fp.read = <bound method BufferedReader.read of <io.BufferedReader object at 0x00DD51B0>>
 G:\cgi\python\lib\email\feedparser.py in feed(self=<email.feedparser.FeedParser object at 0x00DD5250>, data=b'-----------------------------7d91f41a302f4\nCo...\x0e\x0f\x0c\x10\x17\x14\x18\x18\x17\x14\x16\x16')
  150     def feed(self, data):
  151         """Push more data into the parser."""
  152         self._input.push(data)
  153         self._call_parse()
  154 
self = <email.feedparser.FeedParser object at 0x00DD5250>, self._input = <email.feedparser.BufferedSubFile object at 0x00DD5270>, self._input.push = <bound method BufferedSubFile.push of <email.feedparser.BufferedSubFile object at 0x00DD5270>>, data = b'-----------------------------7d91f41a302f4\nCo...\x0e\x0f\x0c\x10\x17\x14\x18\x18\x17\x14\x16\x16'
 G:\cgi\python\lib\email\feedparser.py in push(self=<email.feedparser.BufferedSubFile object at 0x00DD5270>, data=b'-----------------------------7d91f41a302f4\nCo...\x0e\x0f\x0c\x10\x17\x14\x18\x18\x17\x14\x16\x16')
   97         """Push some new data into this object."""
   98         # Handle any previous leftovers
   99         data, self._partial = self._partial + data, ''
  100         # Crack into lines, but preserve the newlines on the end of each
  101         parts = NLCRE_crack.split(data)
data = b'-----------------------------7d91f41a302f4\nCo...\x0e\x0f\x0c\x10\x17\x14\x18\x18\x17\x14\x16\x16', self = <email.feedparser.BufferedSubFile object at 0x00DD5270>, self._partial = ''

TypeError: Can't convert 'bytes' object to str implicitly
      args = ("Can't convert 'bytes' object to str implicitly",)
      with_traceback = <built-in method with_traceback of TypeError object at 0x00DC3AB0>