dyve/django-bootstrap-toolkit

ValueError: read of closed file

Closed this issue · 1 comments

Anyone got the following error…. I am not sure what’s the problem in my code….

Python 3.4 and Soappy-py3 0.52.24 on windows 7

`#!usr/bin/python

from SOAPpy import SOAPProxy

def main():
endpointUrl = 'http://www.ebi.ac.uk/ws/services/WSDbfetch?wsdl'
xmlNamespace = 'http://www.ebi.ac.uk/ws/services/WSDbfetch'
# Default option values.
query = 'uniprot:wap_rat'
format = 'fasta'
style = 'raw'

# Create a service interface.
dbfetchSrv = SOAPProxy(endpointUrl, namespace=xmlNamespace)
dbfetchSrv.config.debug = 1

# Perform the query.
result = dbfetchSrv.fetchData(query, format, style)

# Output the result.
print(result)

if name == "main":
main()
`
Output: Getting the following error:
In build.
In dump. obj= uniprot:wap_rat
In gentag.
In dump_string.
In dumper.
In dump. obj= fasta
In gentag.
In dump_string.
In dumper.
In dump. obj= raw
In gentag.
In dump_string.
In dumper.
*** Outgoing HTTP headers **********************************************
POST /ws/services/WSDbfetch?wsdl HTTP/1.0
Host: www.ebi.ac.uk
User-agent: SOAPpy-py3 0.52.24 (http://pywebsvcs.sf.net)
Content-type: text/xml; charset=UTF-8
Content-length: 633
SOAPAction: "fetchData"


*** Outgoing SOAP ******************************************************
b'\n<SOAP-ENV:Envelope\n SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"\n xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"\n xmlns:xsd="http://www.w3.org/1999/XMLSchema"\n xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"\n xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"\n>\nSOAP-ENV:Body\n<ns1:fetchData xmlns:ns1="http://www.ebi.ac.uk/ws/services/WSDbfetch" SOAP-ENC:root="1">\nuniprot:wap_rat\nfasta\nraw\n</ns1:fetchData>\n</SOAP-ENV:Body>\n</SOAP-ENV:Envelope>\n'


Traceback (most recent call last):
File "c:\pyscripts\soap.py", line 24, in
main()
File "c:\pyscripts\soap.py", line 18, in main
result = dbfetchSrv.fetchData(query, format, style)
File "C:\Python34\lib\site-packages\soappy_py3-0.52.24-py3.4.egg\SOAPpy\Client.py", line 639, in call
File "C:\Python34\lib\site-packages\soappy_py3-0.52.24-py3.4.egg\SOAPpy\Client.py", line 661, in __r_call
File "C:\Python34\lib\site-packages\soappy_py3-0.52.24-py3.4.egg\SOAPpy\Client.py", line 524, in __call
File "C:\Python34\lib\site-packages\soappy_py3-0.52.24-py3.4.egg\SOAPpy\Client.py", line 385, in call
ValueError: read of closed file

dyve commented

Apologies for the late reply. This does not have anything to do with this component, closing.