cytoscape / py4cytoscape

Python library for calling Cytoscape Automation via CyREST
https://Py4Cytoscape.readthedocs.io
Other
69 stars 15 forks source link

Delay for commands_api and cyrest_api #101

Open bdemchak opened 1 year ago

bdemchak commented 1 year ago

Both commands_api() and cyrest_api() open a browser window, which then populate via calls back into Cytoscape. If other CyREST calls are made before the browser window is complete, Cytoscape gets confused on subsequent CyREST calls. This happens because the browser window open call ends before the page is fully displayed.

Solution is to add a delay after opening the browser window so that the window can finish before additional CyREST calls are made. I'm thinking about 10 seconds may work.

Note that this is a show stopper in 3.10.0-RC1, but not in previous Cytoscapes. I don't know why now and not before, but it's not worth finding out. Adding the delay is the right call.