Closed empet closed 5 years ago
we will work on it but don't yet have a timeline.
I would advise you against using conda and to run your work from an official python docker container - https://hub.docker.com/_/python - if you want to have controlled environments.
What functions are you finding problematic on python 3.7.1?
@zachary822 Since py2cytoscape is not yet compatible with Python 3.7+, it stops working just after the following imports and setting the CyRestClient()
:
from py2cytoscape.data.cyrest_client import CyRestClient
from py2cytoscape import cyrest
cy = CyRestClient()
JSONDecodeError Traceback (most recent call last)
<ipython-input-13-8c8d322c11ec> in <module>
----> 1 cy = CyRestClient()
2 cy.session.delete()
3 cytoscape=cyrest.cyclient()
~/Miniconda2/envs/.../py2cytoscape/data/cyrest_client.py in __init__(self, ip, port, version)
17
18 self.network = NetworkClient(self.__url)
---> 19 self.style = StyleClient(self.__url)
20 self.layout = LayoutClient(self.__url)
21 self.edgebundling = EdgeBundlingClient(self.__url)
~/Miniconda2/envs/.../py2cytoscape/data/style_client.py in __init__(self, url)
14 self.__url_apply = url + 'apply/styles/'
15
---> 16 self.vps = VisualProperties(url)
17
18 def create(self, name=None, original_style=None):
~/Miniconda2/envs/.../py2cytoscape/data/style_client.py in __init__(self, url)
75 def __init__(self, url):
76 self.__url = url + 'styles/visualproperties'
---> 77 self.__convert_to_dict()
78
79 def __convert_to_dict(self):
~/Miniconda2/envs/.../py2cytoscape/data/style_client.py in __convert_to_dict(self)
78
79 def __convert_to_dict(self):
---> 80 vps = requests.get(self.__url).json()
81 vp_dict = {}
82 node_vps = []
~/Miniconda2/envs/..../requests/models.py in json(self, **kwargs)
894 # used.
895 pass
--> 896 return complexjson.loads(self.text, **kwargs)
897
898 @property
~/Miniconda2/envs/... /json/__init__.py in loads(s, encoding, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, **kw)
346 parse_int is None and parse_float is None and
347 parse_constant is None and object_pairs_hook is None and not kw):
--> 348 return _default_decoder.decode(s)
349 if cls is None:
350 cls = JSONDecoder
~/Miniconda2/envs/..../lib/json/decoder.py in decode(self, s, _w)
335
336 """
--> 337 obj, end = self.raw_decode(s, idx=_w(s, 0).end())
338 end = _w(s, end).end()
339 if end != len(s):
~/Miniconda2/envs/.../lib/json/decoder.py in raw_decode(self, s, idx)
353 obj, end = self.scan_once(s, idx)
354 except StopIteration as err:
--> 355 raise JSONDecodeError("Expecting value", s, err.value) from None
356 return obj, end
JSONDecodeError: Expecting value: line 1 column 1 (char 0)
After installing Python 3.7.1 almost all Python packages stopped: pandas, igraph, scikit-learn, matplotlib, and more. But after upgrading to the version compatible with the Python version they worked.
Same issue as #79.
#84 This pull request should fix that. It has to do with the usage of the json.load
function. It only excepts strings prior to python 3.5, but excepts strings and bytes after python 3.6.
My mistake. I misread. This is another issue. I am currently fixing an unrelated issue that might solve this problem. It has to do with PUT requests to the api don't have a response body. #84 might fix that issue (02992bb).
For posterity, this is the same underlying issue as #82.
The newest version on pypi should fix this issue. Closed.
Recently I installed
py2cytoscape
and worked with it under an environment with python 3.6.4. Meanwhile I updated thenetworkx
library, via conda, and without notice it installed Python 3.7.1 along with other dependencies. The Python 3.7 was a major release and a lot of python packages that worked with 3.6.4 display errors under python 3.7.1. So I updated numpy, scipy, pandas, etc.Unfortunately
py2cytoscape
hasn't yet a version compatible with 3.7.1, and I cannot use it anymore. Could we hope that in the near future such a version will be available?