[InterMine Dev] auto-generated python code

Julie Sullivan julie at flymine.org
Thu May 14 09:24:22 BST 2015


Hi Kalpana,

I just tried to execute the python script generated on this page:

http://yeastmine.yeastgenome.org/yeastmine/template.do?name=Gene_Transcript

And it worked. Is this error from your dev mine? Am I in the wrong place?

Julie



On 14/05/15 03:08, Kalpana Karra wrote:
>  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')
>
>
> _______________________________________________
> dev mailing list
> dev at intermine.org
> http://mail.intermine.org/cgi-bin/mailman/listinfo/dev
>



More information about the dev mailing list