carto-python: Unable to cc.read or cc.query
Hello! I’ve been trying to do cc.read and cc.query using cartoframes. When I try and run it I get this error message:
<ipython-input-54-d98adbbbcfad> in <module>()
----> 1 assigned = cc.read('us_counties_assigned')
2 unassigned = cc.read('us_counties_unassigned')
/Users/mspichiger/venv/lib/python2.7/site-packages/cartoframes/context.pyc in read(self, table_name, limit, index, decode_geom, shared_user)
192 raise ValueError("`limit` parameter must an integer >= 0")
193
--> 194 return self.query(query, decode_geom=decode_geom)
195
196 def write(self, df, table_name, temp_dir=CACHE_DIR, overwrite=False,
/Users/mspichiger/venv/lib/python2.7/site-packages/cartoframes/context.pyc in query(self, query, table_name, decode_geom)
728 query,
729 skipfields='the_geom_webmercator',
--> 730 **DEFAULT_SQL_ARGS)
731 if 'error' in select_res:
732 raise CartoException(str(select_res['error']))
/Users/mspichiger/venv/lib/python2.7/site-packages/carto/sql.pyc in send(self, sql, parse_json, do_post, format, **request_args)
84 return self.auth_client.get_response_data(resp, parse_json)
85 except Exception as e:
---> 86 raise CartoException(e)
87
88
CartoException: Unterminated string starting at: line 1 column 1349219 (char 1349218)
The confusing part is that every time I run the command I get a new column value. In the example I gave the number is 1349219, but I also get 2981871 (char 2981870), 1266002 (char 1266001), and many more seemingly random columns. The dataset I’m trying to read is about 6.6 MB and has 18 columns. I’ve included the table here:
Let me know if there’s anything I can do to help.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 23 (8 by maintainers)
This should be fixed now: https://github.com/CartoDB/support/issues/1688
Hello, my user is mspichigercarto, the table
target_1
is failing and it’s not even that large. It’s 15 rows by 12 columns. I also notice that other tables that are larger work fine and SOMETIMES reseting the index and dropping the cartodb_id works. It’s not consistent though.Hope this helps
@oleurud, @MichaelSpichiger was our intern and his last day was yesterday.
Basically any large table is failing the query. In my account, the table
lion_lines_full
(this is a data set of streets in NYC) tends to fail. My user ismichellemho-carto
. Let me know if you need more information.