BlinkTagInc / gtfs-to-html

Build human readable transit timetables as HTML or PDF from GTFS.
https://gtfstohtml.com
MIT License
184 stars 56 forks source link

csv output trouble #128

Closed ehowington closed 2 years ago

ehowington commented 2 years ago

cc @ekeaton

I installed the latest version to make use of the csv output but am not getting any tables from https://data.trilliumtransit.com/gtfs/victorville-ca-us/victorville-ca-us--ttable.zip

Config below latest version of g2h downloaded yesterday output error in console (makes one per table)

Screen Shot 2021-12-21 at 10 12 09 AM

then output folder is empty

config.json

{
  "agencies": [
    {
      "agency_key": "VVTA",
      "url": "https://data.trilliumtransit.com/gtfs/victorville-ca-us/victorville-ca-us--ttable.zip"
    }
  ],
  "sqlitePath": "/tmp/gtfs",
  "allowEmptyTimetables": false,
  "beautify": false,
  "coordinatePrecision": 5,
  "dateFormat": "MMM D, YYYY",
  "daysShortStrings": ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
  "daysStrings": ["monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday"],
  "defaultOrientation": "horizontal",
  "effectiveDate": "July 8, 2016",
  "interpolatedStopSymbol": "•",
  "interpolatedStopText": "Estimated time of arrival",
  "linkStopUrls": true,
  "mapboxAccessToken": "YOUR MAPBOX ACCESS TOKEN",
  "menuType": "simple",
  "noDropoffSymbol": "‡",
  "noDropoffText": "No drop off available",
  "noHead": false,
  "noPickupSymbol": "**",
  "noPickupText": "No pickup available",
  "noServiceSymbol": "—",
  "noServiceText": "No service at this stop",
  "outputFormat": "CSV",
  "requestDropoffSymbol": "†",
  "requestDropoffText": "Must request drop off",
  "requestPickupSymbol": "***",
  "requestPickupText": "Request stop - call for pickup",
  "serviceNotProvidedOnText": "Service not provided on",
  "serviceProvidedOnText": "Service provided on",
  "showArrivalOnDifference": 0.2,
  "showMap": false,
  "showOnlyTimepoint": true,
  "showRouteTitle": true,
  "showStopCity": false,
  "showStopDescription": false,
  "showStoptimesForRequestStops": true,
  "skipImport": false,
  "sortingAlgorithm": "common",
  "templatePath": "views/default",
  "timeFormat": "h:mma",
  "useParentStation": true,
  "verbose": true,
  "zipOutput": false
}
brendannee commented 2 years ago

Thanks for posting this.

Its possible that your globally installed GTFS-to-HTML doesn't match the template being used.

Are you running the global version using the

gtfs-to-html

command?

Try

 gtfs-to-html --version

to see what version is installed globally and let me know the version number.

ehowington commented 2 years ago

I have tried using the most recent version of the default template and our own template. Ours produces html files, not csv files, but it does at least produce files.

When running gtfs-to-html --version I get unknown

brendannee commented 2 years ago

I think your globally installed GTFS-to-HTML is out of date.

Try uninstalling and reinstalling.

npm uninstall -g gtfs-to-html

Then check to make sure it is uninstalled (this should give an error)

gtfs-to-html

Then reinstall

npm install -g gtfs-to-html

Then check the version

gtfs-to-html --version
ekeaton commented 2 years ago

@brendannee I updated to the newest version 2.3.1 but I noticed it downloaded in a new location. Instead of /usr/local/lib/node_modules/gtfs-to-html it downloaded to /opt/homebrew/lib/node_modules/gtfs-to-html

I also tried to check my version of gtfs-to-html using gtfs-to-html --versionbut it said unknown each time. Instead I checked it looking in package.json (per usual)

I do have one question/ possible request. I noticed when changing the output to pdf, both html and pdf files were downloaded. But with csv only the csv files are downloaded. I actually like this better, especially for larger feeds as the turnaround time was much quicker. Would it be possible to update the pdf output so it only produces pdfs and not html files as well?

brendannee commented 2 years ago

It sounds like the node version on your system was updated to be managed by homebrew since the last time you installed gtfs-to-html.

Did the update solve the issue?

In order to generate PDFs, we need to also generate HTML as that is actually used to render the PDF. I could update the script to delete the HTML versions when completed, but that will not speed up the process at all.

ekeaton commented 2 years ago

@brendannee Understood! My test are unrelated to @evantrillium original issue. I don't believe he has it working locally yet. But that's okay I can run any files we need.

Thank you for your help!