BlinkTagInc / gtfs-to-html

Build human readable transit timetables as HTML or PDF from GTFS.

Home Page:https://gtfstohtml.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] Error: this.stream.clearLine is not a function

brodyFlannigan opened this issue · comments

Hi! I seem to have encountered an error with the latest release of GTFS-to-HTML (1.4.5)

Issue

When running GTFS-to-HTML, feed will import correctly and GTFS-to-HTML will export 1 timetable, then this error message appears:

Error: this.stream.clearLine is not a function
[  TypeError: this.stream.clearLine is not a function

  - node-progress.js:210 ProgressBar.interrupt
    [npm]/[gtfs-to-html]/[progress]/lib/node-progress.js:210:15

  - gtfs-to-html.js:81 module.exports
    [npm]/[gtfs-to-html]/lib/gtfs-to-html.js:81:11

  - gtfs-to-html.js:39 async setupImport
    [npm]/[gtfs-to-html]/bin/gtfs-to-html.js:39:3

]

Expected behaviour

GTFS-to-HTML would not produce an error message, and all timetables would export

Reproduction steps

  1. Install GTFS-to-HTML
  2. Open the config-sample.json file and remove the sqlitePath variable from the file, then set showMap to false.
  3. Run GTFS-to-HTML using the sample config file
  4. Watch GTFS-to-HTML come to a grinding halt.

Thanks!

Thanks for the detailed report.

Can you tell me what OS you are on and what version of node.js you are using so I I can try to reproduce?

Does this issue only occur when showMap is set to false?

It seems like a windows issue with the way logging to the console is happening inside of the node progress module.

I pushed an update that may solve this - GTFS-to-HTML 1.4.6

If updating to version 1.4.6 doesn't work, here are a few suggestions:

Try setting verbose to false in your config.json for GTFS-to-HTML - this should hide all logs to the terminal

Try running gtfs-to-html in an external terminal application on your machine and not inside of VScode or webstorm. See this comment for details https://stackoverflow.com/a/58063715/363155

Sorry about the delay in response. I'm really busy. I should have time to try out you possible fix tomorrow.

Setting verbose to false was the fix, although it isn't ideal, I can live with it.
Thanks for the help. Closing issue