cyang-kth/fmm

Error occurs when getting input from file - RuntimeError:stoi

ThirasaraAriyarathna opened this issue · 3 comments

Traceback (most recent call last):
File "porto.py", line 44, in
status = model.match_gps_file(input_config, result_config, fmm_config, use_omp=True)
File "/Usr/miniconda3/envs/py27/lib/python2.7/site-packages/fmm.py", line 1533, in match_gps_file
return _fmm.FastMapMatch_match_gps_file(self, gps_config, result_config, config, use_omp)
RuntimeError: stoi

This error occurs when I tried to get input from a file. However, using the same ubodt.txt I can match wkts.
Following are the configurations of input and output files.

gps file :
id column : TRIP_ID
geom column : geometry
timestamp column : timestamp
x column : x
y column : y
GPS point : false

Result file :
Output fields: opath pgeom offset error spdist cpath tpath mgeom ep tp length duration speed

And also I get following warning.
[2021-05-26 13:33:00.232] [warning] [ubodt.cpp:242] Load factor is too large.

Road network data:
Graph nodes 761535 edges 1839349

From your description, the gps file is empty, you need to specify a file name. Please check the example folder for notebook files.

The reason you did see anything in the file field is that you assign the file field after the print function in your code.

Also make sure that your trip.csv file format match this one https://github.com/cyang-kth/fmm/blob/master/example/data/trips.csv including your header name, separater of ;, geometry format.