I'm using Google Chrome on Mac OS X 10.11.4. Im trying to run this example from the mpld3
library. I read that mpld3
does not work on python 3.5,
The
mpld3
project is compatible with Python 2.6-2.7 and 3.3-3.4.
so I created a 3.4 environment using:
conda create -n py34 python=3.4 anaconda
When running the script I get the following error:
Exception happened during processing of request from ('127.0.0.1', 52484)
Traceback (most recent call last):
File "/Users/Neill/anaconda/envs/py34/lib/python3.4/socketserver.py", line 305, in _handle_request_noblock
self.process_request(request, client_address)
File "/Users/Neill/anaconda/envs/py34/lib/python3.4/socketserver.py", line 331, in process_request
self.finish_request(request, client_address)
File "/Users/Neill/anaconda/envs/py34/lib/python3.4/socketserver.py", line 344, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/Users/Neill/anaconda/envs/py34/lib/python3.4/socketserver.py", line 673, in __init__
self.handle()
File "/Users/Neill/anaconda/envs/py34/lib/python3.4/http/server.py", line 401, in handle
self.handle_one_request()
File "/Users/Neill/anaconda/envs/py34/lib/python3.4/http/server.py", line 389, in handle_one_request
method()
File "/Users/Neill/anaconda/envs/py34/lib/python3.4/site-packages/mpld3/_server.py", line 38, in do_GET
self.wfile.write("<html><head>"
File "/Users/Neill/anaconda/envs/py34/lib/python3.4/socket.py", line 398, in write
return self._sock.send(b)
TypeError: 'str' does not support the buffer interface
I also made sure that the latest version of mpld3
is installed. The local server then displays a blank page. Chrome's developer tools also report no errors. Does anyone have an idea what the problem might be?