SArray constructor accessible via ipdb debugger but not within script

User 2310 | 9/24/2015, 11:13:45 PM

The problematic line is:

doc = gl.SArray(doc)

The error: TypeError: 'SArray' object is not callable

However, if I execute each line of the script from within the ipdb debugger, it's fine and doesn't produce an error.

` @app.route(u'/new', methods=[u'POST']) def topifydoc(): # ipdb.settrace() doc = json.loads(request.form.get('data')) # array of string ipdb.settrace() doc = gl.SArray(doc) doc = gl.textanalytics.countwords(doc) doc = doc.dicttrimbykeys(gl.text_analytics.stopwords(), True) doc = gl.SFrame(doc)



Most of the suggested similar questions claim this error is produced by an indexing syntax error (i.e., that it should be [] instead of () ). But I'm trying to invoke the constructor here, so the function call would seem to be correct, no?


User 2310 | 9/25/2015, 6:13:58 PM

I've come to realize the problem has everything to do with the route and its response. Not GraphLab. Apologies.

User 1207 | 9/25/2015, 8:44:23 PM

No worries! Thanks for bringing it up. Let us know if you have any other issues :-).

-- Hoyt