cytoscape / py2cytoscape

Python utilities for Cytoscape and Cytoscape.js
https://py2cytoscape.readthedocs.io
MIT License
178 stars 45 forks source link

"cyclient.session.open(session_url=" does not work(?) #94

Open kozo2 opened 5 years ago

kozo2 commented 5 years ago

cyclient.session.open(session_url= does not work.

Cytoscape: 3.7.1

CyRest: 3.8.0

Java:

java -version
openjdk version "1.8.0_222"
OpenJDK Runtime Environment Corretto-8.222.10.1 (build 1.8.0_222-b10)
OpenJDK 64-Bit Server VM Corretto-8.222.10.1 (build 25.222-b10, mixed mode)

Code:

from py2cytoscape import cyrest
cytoscape=cyrest.cyclient()
cytoscape.session.open(session_url="http://nrnb.org/data/BasicDataVizDemo.cys")

error:


<Response [500]> 500
b'{\n "data": {},\n "errors":[{"status":500,"type":"urn:cytoscape:ci:cyrest-core:v1:handle-json-command:errors:2","message":"Mark/Reset not supported.","link":"file:/Users/knishida/CytoscapeConfiguration/3/framework-cytoscape.log"}]\n}'
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-15-f521a220739d> in <module>
      1 from py2cytoscape import cyrest
      2 cytoscape=cyrest.cyclient()
----> 3 cytoscape.session.open(session_url="http://nrnb.org/data/BasicDataVizDemo.cys")

~/miniconda3/lib/python3.7/site-packages/py2cytoscape/cyrest/session.py in open(self, session_file, session_url, verbose)
     34 
     35         PARAMS=set_param(["file", "url"],[session_file, session_url])
---> 36         response=api(url=self.__url+"/open", PARAMS=PARAMS, verbose=verbose)
     37         return response
     38 

~/miniconda3/lib/python3.7/site-packages/py2cytoscape/cyrest/base.py in api(namespace, command, PARAMS, body, host, port, version, method, verbose, url, parse_params)
    148         if "errors" in res.keys():
    149             if len(res["errors"]) > 0:
--> 150                 raise ValueError(res["errors"][0])
    151         if not verbose:
    152             if "data" in res.keys():

ValueError: {'status': 500, 'type': 'urn:cytoscape:ci:cyrest-core:v1:handle-json-command:errors:2', 'message': 'Mark/Reset not supported.', 'link': 'file:/Users/knishida/CytoscapeConfiguration/3/framework-cytoscape.log'}
jorgeboucas commented 5 years ago

this does not seem to be python related as it also fails while testing in swagger

jorgeboucas commented 5 years ago

@dotasek could you check my comment just above this one, we are having troubles with session.open Thanks!