How to show canvas in PyCharm using graphlab create?

User 2969 | 1/7/2016, 2:51:39 AM

Hi, So I've installed Graphlab Create and running smoothly in iPython Notebook. My question is, I want to use graphlab create in PyCharm IDE and I want to see the canvas. Here is my code snippet.

import graphlab

sf = graphlab.SFrame('people-example.csv') sf.show()

But I'm getting error as follows:

Canvas is accessible via web browser at the URL: http://localhost:53700/index.html Opening Canvas in default web browser. [INFO] Stopping the server connection. Unhandled exception in thread started by <bound method Thread.bootstrap of <Thread(canvas_server, stopped daemon 123145330827264)>> Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 783, in bootstrap self.bootstrap_inner() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 823, in bootstrapinner (self.name, formatexc())) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/traceback.py", line 241, in formatexc etype, value, tb = sys.excinfo() AttributeError: 'NoneType' object has no attribute 'excinfo'

Process finished with exit code 0

And in the browser, it says webpage is not available.

Please note that I'm new to graphlab create and python so any help would be appreciated.

Comments

User 940 | 1/7/2016, 7:35:31 PM

Hi @"Mehul Patel" ,

The .show() command does not block execution, so it appears the Python process is exiting prematurely while .show() is still trying to run.

To prevent this from happening, you can run Python in an interactive mode. In PyCharm, click "Run...", "Edit Configurations", then check the box for "Show command line afterwards". This will enable interactive mode for the Python interpreter, similar to a command-line ipython, which should allow .show() to execute normally.

I hope this helps, and let us know if you have any more questions!

Cheers! -Piotr