--> -->
 
 
TypeError
Python 3.8.10: /usr/bin/python
Mon Oct 25 05:25:49 2021

A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.

 /usr/lib/cgi-bin/stage1.py in <module>
    116                 redirect("stage3.py?" + data, "0")
    117                 
    118 cgitb.enable()
    119 util.printHTMLHeader()
=>  120 main()
main = <function main>
 /usr/lib/cgi-bin/stage1.py in main()
     95                 url = "http://127.0.0.1:8080/axis2/services/anatomy/tag"
     96                 xmldata = "text=" + q_anatomy
=>   97                 gene_ner_xml = urlopen(url,xmldata).read()
     98 #               print "<br>Gene NER: <a href=\"" + gene_link + "\">" + gene_link + "</a><br>\n"
     99 #               print "<br><hr>"
gene_ner_xml undefined, global urlopen = <function urlopen>, url = 'http://127.0.0.1:8080/axis2/services/anatomy/tag', xmldata = 'text=T cells', ).read undefined
 /usr/lib/python3.8/urllib/request.py in urlopen(url='http://127.0.0.1:8080/axis2/services/anatomy/tag', data='text=T cells', timeout=<object object>, cafile=None, capath=None, cadefault=False, context=None)
    220     else:
    221         opener = _opener
=>  222     return opener.open(url, data, timeout)
    223 
    224 def install_opener(opener):
opener = <urllib.request.OpenerDirector object>, opener.open = <bound method OpenerDirector.open of <urllib.request.OpenerDirector object>>, url = 'http://127.0.0.1:8080/axis2/services/anatomy/tag', data = 'text=T cells', timeout = <object object>
 /usr/lib/python3.8/urllib/request.py in open(self=<urllib.request.OpenerDirector object>, fullurl='http://127.0.0.1:8080/axis2/services/anatomy/tag', data='text=T cells', timeout=<object object>)
    520         for processor in self.process_request.get(protocol, []):
    521             meth = getattr(processor, meth_name)
=>  522             req = meth(req)
    523 
    524         sys.audit('urllib.Request', req.full_url, req.data, req.headers, req.get_method())
req = <urllib.request.Request object>, meth = <bound method AbstractHTTPHandler.do_request_ of <urllib.request.HTTPHandler object>>
 /usr/lib/python3.8/urllib/request.py in do_request_(self=<urllib.request.HTTPHandler object>, request=<urllib.request.Request object>)
   1283                 msg = "POST data should be bytes, an iterable of bytes, " \
   1284                       "or a file object. It cannot be of type str."
=> 1285                 raise TypeError(msg)
   1286             if not request.has_header('Content-type'):
   1287                 request.add_unredirected_header(
builtin TypeError = <class 'TypeError'>, msg = 'POST data should be bytes, an iterable of bytes, or a file object. It cannot be of type str.'

TypeError: POST data should be bytes, an iterable of bytes, or a file object. It cannot be of type str.
      args = ('POST data should be bytes, an iterable of bytes, or a file object. It cannot be of type str.',)
      with_traceback = <built-in method with_traceback of TypeError object>