Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to save network with GLViewer node #28

Open
borupdaniel opened this issue Jan 16, 2020 · 1 comment
Open

Unable to save network with GLViewer node #28

borupdaniel opened this issue Jan 16, 2020 · 1 comment

Comments

@borupdaniel
Copy link
Member

@nckz identified this on GitLab a while ago — I can confirm it is still an issue in GPI 1.1.6.

Here is the error message I get in a Python 3.8 environment:

Thu Jan 16 10:33:46 2020 - gpi.network:367 - ERROR - Saving network failed. Traceback (most recent call last):
  File "/Users/m206107/gpi_stack/envs/gpi38/lib/python3.8/site-packages/gpi/network.py", line 364, in save
    json.dump(self._contents, fptr, sort_keys=True, indent=1)
  File "/Users/m206107/gpi_stack/envs/gpi38/lib/python3.8/json/__init__.py", line 179, in dump
    for chunk in iterable:
  File "/Users/m206107/gpi_stack/envs/gpi38/lib/python3.8/json/encoder.py", line 431, in _iterencode
    yield from _iterencode_dict(o, _current_indent_level)
  File "/Users/m206107/gpi_stack/envs/gpi38/lib/python3.8/json/encoder.py", line 405, in _iterencode_dict
    yield from chunks
  File "/Users/m206107/gpi_stack/envs/gpi38/lib/python3.8/json/encoder.py", line 405, in _iterencode_dict
    yield from chunks
  File "/Users/m206107/gpi_stack/envs/gpi38/lib/python3.8/json/encoder.py", line 325, in _iterencode_list
    yield from chunks
  File "/Users/m206107/gpi_stack/envs/gpi38/lib/python3.8/json/encoder.py", line 405, in _iterencode_dict
    yield from chunks
  File "/Users/m206107/gpi_stack/envs/gpi38/lib/python3.8/json/encoder.py", line 405, in _iterencode_dict
    yield from chunks
  File "/Users/m206107/gpi_stack/envs/gpi38/lib/python3.8/json/encoder.py", line 325, in _iterencode_list
    yield from chunks
  File "/Users/m206107/gpi_stack/envs/gpi38/lib/python3.8/json/encoder.py", line 405, in _iterencode_dict
    yield from chunks
  File "/Users/m206107/gpi_stack/envs/gpi38/lib/python3.8/json/encoder.py", line 405, in _iterencode_dict
    yield from chunks
  File "/Users/m206107/gpi_stack/envs/gpi38/lib/python3.8/json/encoder.py", line 438, in _iterencode
    o = _default(o)
  File "/Users/m206107/gpi_stack/envs/gpi38/lib/python3.8/json/encoder.py", line 179, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type ndarray is not JSON serializable
@borupdaniel
Copy link
Member Author

Actually, it will save a .net file, but GPI will crash when trying to load that file as a network.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant