AttributeError: 'module' object has no attribute 'Sframe'

2.7k Views Asked by At

I installed Dato's GraphLab Create to run with python 27 first directly from its executable then manually via pip (instructions here) for troubleshooting.

Code:

import graphlab
graphlab.SFrame()

Output:

[INFO] Start server at: ipc:///tmp/graphlab_server-4908 
- Server binary: C:\Users\Remi\Anaconda2\envs\dato-env\lib\site-packages\graphlab\unity_server.exe 
- Server log: C:\Users\Remi\AppData\Local\Temp\graphlab_server_1455637156.log.0
[INFO] GraphLab Server Version: 1.8.1

Now, attempt to load a .csv file as an Sframe:

csvsf = graphlab.Sframe('file.csv')

complains:

AttributeError Traceback (most recent call last)
<ipython-input-5-68278493c023> in <module>()
 ----> 1 sf = graphlab.Sframe('file.csv')
AttributeError: 'module' object has no attribute 'Sframe'

Any idea(s) how to pinpoint the issue? Thanks so much.

Note: Uninstalled an already present python 34 version

2

There are 2 best solutions below

1
On

capitalization error, it should be SFrame, not Sframe

0
On

You can only load a graplab package ('file.gl') by graphlab.SFrame(). Instead to load a csv file use csvf = graphlab.SFrame.read_csv('file.csv') for more information and other data types read this docs https://dato.com/products/create/docs/graphlab.data_structures.html