[InterMine Dev] auto-generated python code

Kalpana Karra kkarra at stanford.edu
Thu May 14 03:08:32 BST 2015


From the template page, getting Python code and running it is giving me the error below. It works fine with the pythin code from Results Table which does not use get_template.

I am wondering why the error seems to indicate as though template name is ‘xml’ instead of ‘Gene_Transcript’.

Thanks,
-Kalpana


./transcript_template_form.py
Traceback (most recent call last):
  File "./transcript_template_form.py", line 20, in <module>
    template = service.get_template('Gene_Transcript')
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/intermine-1.00.00-py2.7.egg/intermine/webservice.py", line 398, in get_template
    t = self.templates[name]
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/intermine-1.00.00-py2.7.egg/intermine/webservice.py", line 277, in __getattribute__
    return object.__getattribute__(self, name)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/intermine-1.00.00-py2.7.egg/intermine/webservice.py", line 429, in templates
    sock = self.opener.open(self.root + self.TEMPLATES_PATH)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/intermine-1.00.00-py2.7.egg/intermine/results.py", line 558, in open
    return urllib.FancyURLopener.open(self, url, data)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib.py", line 207, in open
    return getattr(self, name)(url)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib.py", line 358, in open_http
    return self.http_error(url, fp, errcode, errmsg, headers)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib.py", line 371, in http_error
    result = method(url, fp, errcode, errmsg, headers)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/intermine-1.00.00-py2.7.egg/intermine/results.py", line 664, in http_error_404
    raise WebserviceError("Missing resource", errcode, errmsg, message)
intermine.errors.WebserviceError: ('Missing resource', 404, 'Not Found', '[ERROR] 404 No template found called xml')
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.intermine.org/pipermail/dev/attachments/20150513/d4201347/attachment.html>


More information about the dev mailing list