python - Runtime error while trying to load a dataset as a table in Snap.py -
i trying load co04_dist.txt http://people.sc.fsu.edu/~jburkardt/datasets/cities/cities.html table in snap.py
import snap context = snap.ttablecontext() filename = "co04_dist.txt" schema = snap.schema() schema.add(snap.tstrtattrpr("col1", snap.atint)) schema.add(snap.tstrtattrpr("col2", snap.atint)) schema.add(snap.tstrtattrpr("col3", snap.atint)) schema.add(snap.tstrtattrpr("col4", snap.atint)) table = snap.ttable.loadss(schema, filename, context, "\t", snap.tbool(false))
but runtime error claiming application requested runtime terminate in unusual way. says in shell:
traceback (most recent call last): file "c:\users\user\documents\city.py", line 12, in <module> table = snap.ttable.loadss(schema, filename, context, "\t", snap.tbool(false)) file "c:\python27\lib\snap.py", line 23070, in loadss return _snap.ttable_loadss(*args) runtimeerror: execution stopped: ss.getflds() == s.len(), file c:\cygwin\home\rok\build\snap\snap-core\table.cpp, line 683
i have ensured txt file in same directory .py file.
Comments
Post a Comment