Re: Python API

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Python API

Julie Sullivan-2
Hi Armen,

Sorry you are having trouble! I am CCing our public InterMine dev list
as others may be having this problem too.

The error is

         'There is no field called interactions in Gene'

Which intermine are you using? Does that mine have a data model that
includes interactions? If so, what does your script look like?

In FlyMine, interactions is a collection (or set) meaning that one gene
can have zero to many interactions. Gene has also several fields, e.g.
"name".

Here's an example query for interactions:

http://www.flymine.org/flymine/template.do?name=Gene_Interactions2

Does that help?

Julie

PS. We have a google group too if that's easier for you:

https://groups.google.com/forum/#!categories/intermine

On 06/26/2016 03:04 AM, Armen Halajyan wrote:

> Hi Julie,
>
> I am trying to  use the webservice in my python script but I keep
> getting this error:
>
> Exception in Tkinter callback
> Traceback (most recent call last):
>    File
> "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/tkinter/__init__.py",
> line 1549, in __call__
>      return self.func(*args)
>    File "/Users/Armen/Documents/CSUN/Research/Loza-Coll
> Lab/PythonBioinformatics/Network Generator/Main2_alt.py", line 254, in
> submit
>      self.define_networks()
>    File "/Users/Armen/Documents/CSUN/Research/Loza-Coll
> Lab/PythonBioinformatics/Network Generator/Main2_alt.py", line 180, in
> define_networks
>      define_genes_results = self.define_genes(re.sub("\n", ",",
> re.sub("\"", "", data)))
>    File "/Users/Armen/Documents/CSUN/Research/Loza-Coll
> Lab/PythonBioinformatics/Network Generator/Main2_alt.py", line 195, in
> define_genes
>      "interactions.participant2.primaryIdentifier")
>    File "/Users/Armen/Documents/CSUN/Research/Loza-Coll
> Lab/PythonBioinformatics/Network Generator/Main2_alt.py", line 160, in
> intermine_query
>      my_query.add_view(*args)
>    File
> "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/intermine/query.py",
> line 667, in add_view
>      self.verify_views(views_to_add)
>    File
> "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/intermine/query.py",
> line 713, in verify_views
>      path = self.model.make_path(path, self.get_subclass_dict())
>    File
> "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/intermine/model.py",
> line 973, in make_path
>      return Path(path, self, subclasses)
>    File
> "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/intermine/model.py",
> line 435, in __init__
>      self.parts = model.parse_path_string(str(path), subclasses)
>    File
> "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/intermine/model.py",
> line 1030, in parse_path_string
>      field = current_class.get_field(field_name)
>    File
> "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/intermine/model.py",
> line 309, in get_field
>      raise ModelError("There is no field called %s in %s" % (name,
> self.name <http://self.name>))
> intermine.model.ModelError: 'There is no field called interactions in Gene'
>
>
>
>
> Could you please, help me figure out what is going on.
>
>
> Kind regards, Armen Halajyan
_______________________________________________
dev mailing list
[hidden email]
https://lists.intermine.org/mailman/listinfo/dev
Loading...