rosinality / knotter

Implementation of Mapper algorithm for Topological Data Analysis
MIT License
45 stars 13 forks source link

Error launching knotter on OSX #4

Open smartinsightsfromdata opened 7 years ago

smartinsightsfromdata commented 7 years ago

I've installed the latest version of knotter with pip on OSX. Normally I use Anaconda python.

This is the error:

$ knotter
Serving at port 8000
Server started at http://localhost:9000
0:30: execution error: An error of type -10814 has occurred. (-10814)
69:77: execution error: Can’t get application "chrome". (-1728)
127.0.0.1 - - [04/Apr/2017 22:27:33] code 404, message File not found
127.0.0.1 - - [04/Apr/2017 22:27:33] "GET /favicon.ico HTTP/1.1" 404 -
Error handling request
Traceback (most recent call last):
  File "/Users/e/anaconda3/lib/python3.6/site-packages/aiohttp/web_protocol.py", line 417, in start
    resp = yield from self._request_handler(request)
  File "/Users/e/anaconda3/lib/python3.6/site-packages/aiohttp/web.py", line 289, in _handle
    resp = yield from handler(request)
  File "/Users/e/anaconda3/lib/python3.6/site-packages/knotter/server.py", line 476, in handler
    self.ws.start(request)
AttributeError: 'WebSocketResponse' object has no attribute 'start'
127.0.0.1 - - [04/Apr/2017 22:27:33] code 404, message File not found
127.0.0.1 - - [04/Apr/2017 22:27:33] "GET /favicon.ico HTTP/1.1" 404 -
127.0.0.1 - - [04/Apr/2017 22:27:33] code 404, message File not found
127.0.0.1 - - [04/Apr/2017 22:27:33] "GET /bower_components/paper-listbox/paper-listbox.html HTTP/1.1" 404 -

After this the browser (usually Firefox) comes up. I load swiss-roll.csv. It appears loaded but I cannot see anything (just the file name in the upper left corner) nor select / deselect anything. No nodes to display: basically the app is not responding.

rosinality commented 7 years ago

Problem due to API changes of the newer version of aiohttp. Resolved in 5513a10a44d3658eebd138dbbf417acc87c5042c.

smartinsightsfromdata commented 7 years ago

I'm now on version 0.2.4.

I still seem to have troubles...

$ knotter
Serving at port 8000
Server started at http://localhost:9000
0:30: execution error: An error of type -10814 has occurred. (-10814)

After that the localhost page (on chrome) remains blank.

But if I go to firefox it works?

rosinality commented 7 years ago

That execution error is related with OS X. I think it will work well if you refresh the page.

yusufsn commented 7 years ago

I want to analyse TDA using knotter. When I analyse them on Linux and Windows, they work. But when I try to analyse the same data using knotter on MacOS, it comes error. See below:

Traceback (most recent call last):
  File "/Users/YusufNugroho/anaconda/envs/py36/lib/python3.6/site-packages/knotter/server.py", line 484, in handler
    self.event_map[data['type']](data)
  File "/Users/YusufNugroho/anaconda/envs/py36/lib/python3.6/site-packages/knotter/server.py", line 473, in analyze
    'summary': self.analyzer.variable_summary()})
  File "/Users/YusufNugroho/anaconda/envs/py36/lib/python3.6/site-packages/knotter/server.py", line 376, in response
    self.ws.send_str(json.dumps(content))
  File "/Users/YusufNugroho/anaconda/envs/py36/lib/python3.6/json/__init__.py", line 231, in dumps
    return _default_encoder.encode(obj)
  File "/Users/YusufNugroho/anaconda/envs/py36/lib/python3.6/json/encoder.py", line 199, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/Users/YusufNugroho/anaconda/envs/py36/lib/python3.6/json/encoder.py", line 257, in iterencode
    return _iterencode(o, 0)
  File "/Users/YusufNugroho/anaconda/envs/py36/lib/python3.6/json/encoder.py", line 180, in default
    o.__class__.__name__)
TypeError: Object of type 'float32' is not JSON serializable
rosinality commented 7 years ago

I can't reproduce it, but made some patch that can potentially prevent.