Select to view content in your preferred language

Runtime Error in pre-processing buffers for count trips in polygon buffers

1475
5
Jump to solution
03-31-2019 12:12 PM
Labels (1)
tommychan
Emerging Contributor

Hi,

I received the following error when I performed step 1 of the pre-process buffers inside the Count Trips in Polygon Buffers around Stops toolbox.

Messages
Executing: BBBPolygons_PreprocessBuffers "C:\DESERT\GTFS OUTPUT" 0255OUTPUT "C:\DESERT\gtfs inter\outputsql.sql" C:\DESSSERT\CENTERLINE_ND.nd "Length (Units: Meters)" 250 # 20
Start Time: Mon Apr 1 02:56:08 2019
Running script BBBPolygons_PreprocessBuffers...
Creating a feature class of GTFS stops...
Error creating a feature class of GTFS stops.
Failed to create BetterBusBuffers polygons.

Traceback (most recent call last):
File "<string>", line 483, in execute
File "C:\DESERT\BetterBusBuffers_0.13.0.3\BBB_Polygons_Step1.py", line 87, in runTool
StopsLayer, StopIDList = BBB_SharedFunctions.MakeStopsFeatureClass(os.path.join(outGDBwPath, "Step1_Stops"))
File "C:\DESERT\BetterBusBuffers_0.13.0.3\BBB_SharedFunctions.py", line 750, in MakeStopsFeatureClass
stop[2], stop[3], stop[6], stop[7], stop[8], stop[9]))
RuntimeError: The row contains a bad value. [stop_name]

Failed to execute (BBBPolygons_PreprocessBuffers).
Failed at Mon Apr 1 02:56:11 2019 (Elapsed Time: 3.11 seconds)

It seems to me that there is an error in creating a feature class of GTFS Stops. I have also performed other process, e.g. the Count Trips at Stops, and Interpolate Blank Stop Times, that shows no problem.

Is there anything I can do with this error?

Thank you!

0 Kudos
1 Solution

Accepted Solutions
MelindaMorang
Esri Regular Contributor

Hello Tommy.  I found the bug.  The values in your GTFS data's stop_name field are very long, and they were exceeding the length of the field in the output feature class.  I should have been handling that situation.  I have made an update to the tool to truncate overlong text values.  You can download the latest version of the toolbox from http://arcg.is/0yr9fr, or you can just download the updated BBB_SharedFunctions.py file and replace your existing one.  Post again if you have further problems.

View solution in original post

5 Replies
MelindaMorang
Esri Regular Contributor

Can you post the GTFS dataset you're using?  I can give it a try and see if I can reproduce the problem.

0 Kudos
tommychan
Emerging Contributor

The file is uploaded here.

The stop_times.txt is interpolated with your tool, and the original stop_times.txt is located inside the folder.

Many thanks!

0 Kudos
tommychan
Emerging Contributor

Updated the file link. Here it is.

0 Kudos
MelindaMorang
Esri Regular Contributor

Hello Tommy.  I found the bug.  The values in your GTFS data's stop_name field are very long, and they were exceeding the length of the field in the output feature class.  I should have been handling that situation.  I have made an update to the tool to truncate overlong text values.  You can download the latest version of the toolbox from http://arcg.is/0yr9fr, or you can just download the updated BBB_SharedFunctions.py file and replace your existing one.  Post again if you have further problems.

tommychan
Emerging Contributor

Hi,

It runs perfect now, thank you!

0 Kudos