Problem with

User 2425 | 10/16/2015, 5:24:00 PM


I have some problem while using "show()" .Below is my Code:

` import graphlab

sf = graphlab.SFrame ('/Users/Jason/Desktop/coursera/python - uw/people-example.csv')

The out of the Code is:

AttributeError Traceback (most recent call last) <ipython-input-5-5ed0e1e363af> in <module>() ----> 1

/Users/Jason/anaconda/envs/dato-env/lib/python2.7/site-packages/graphlab/datastructures/sframe.pyc in show(self, columns, view, x, y) 4480 LOGGER.warn("Column selection for is deprecated. To show only certain columns, use the sf[['column1', 'column2']] syntax or construct a new SFrame with the desired columns.") 4481 from import show -> 4482 show(self, view=view, x=x, y=y) 4483 4484 def packcolumns(self, columns=None, column_prefix=None, dtype=list,

/Users/Jason/anaconda/envs/dato-env/lib/python2.7/site-packages/multipledispatch/dispatcher.pyc in call(self, args, **kwargs) 162 self._cache[types] = func 163 try: --> 164 return func(args, **kwargs) 165 166 except MDNotImplementedError:

/Users/Jason/anaconda/envs/dato-env/lib/python2.7/site-packages/graphlab/canvas/glcdisplaydispatch.pyc in show(obj, **kwargs) 7 import graphlab.canvas.inspect 8 import graphlab.canvas.views.sframe ----> 9 graphlab.canvas.inspect.find_vars(obj) 10 return, params=kwargs)) 11

/Users/Jason/anaconda/envs/dato-env/lib/python2.7/site-packages/graphlab/canvas/inspect.pyc in findvars(var) 41 (variablename, variable) = findvariablename(var) 42 if variablename is not None: ---> 43 target.addvariable((variablename,), variable) 44 return variable_name 45

AttributeError: 'NoneType' object has no attribute 'add_variable'

When i use the code:


* The output is:

Error: Requested port is unavailable: 111 `

I use anaconda to launch ipython-notebook(4.0.4) use "pip" to install Graphlab(1.6.1) python (2.7) Chrome (46.0.2490.71 (64-bit)) OS X (10.11 Beta 15A278b)

Can you help me please? Thanks


User 1174 | 10/16/2015, 6:33:39 PM


Can you try using a different port for canvas?

graphlab.canvas.set_target('browser', 8888)

port 111 is the port mapper, and Canvas cannot bind its server to that port.

User 4 | 10/16/2015, 8:52:50 PM

It's also worth noting that ports under 1024 are privileged and require root permission to bind. If you omit the second parameter to set_target, it will attempt to choose a random open port over 1024. Otherwise, you can try specifying a port over 1024. In either case, hopefully that will fix the issue above: the error you are seeing indicates that the Canvas browser target (the default target) failed to bind to any port.

User 2425 | 10/17/2015, 12:25:56 AM

Thanks for your comment! I tried the code:


but the output is below:

Error: Requested port is unavailable: 8888

User 4 | 10/17/2015, 1:52:40 AM

Hi @loljr -- I would suggest you try a different port, or a few different ports, over 1024 (8888 is commonly taken, and it's used by IPython Notebook as well so it's likely to be in use already if you are running IPython Notebook). We've also seen problems in the past related to modifications to the /etc/hosts file. Can you try a few simple tests:

  1. ping localhost -- does this resolve to Do you get a ping response?
  2. Can you verify that localhost is listed in the file /etc/hosts, with only a single IP address (not more than one IP address)?

There could also be a firewall or permission issue preventing the process from binding to any port. If you are able to ping localhost, and it resolves to, but a random selection of ports over 1024 still does not work, I would investigate potential software firewall issues that are preventing the use of networking in general by non-approved processes. Hope that helps!

User 2425 | 10/17/2015, 10:47:05 AM

Hi I set my localhost to And it works!!! Thanks a bunch!!!