You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi.
I just installed a clean new version of MagicMirror, added this module (from the greenkeeper/hafas-client-5.1.1 branch) modified the example configuration with my own station ID and started MM.
But the module crashes with the following message:
[17:46:00.564] [ERROR] TypeError: userAgent must be a string
at createClient (/home/pi/MagicMirror/modules/MMM-PublicTransportHafas/node_modules/hafas-client/index.js:31:9)
at new HafasFetcher (/home/pi/MagicMirror/modules/MMM-PublicTransportHafas/core/HafasFetcher.js:29:24)
at Class.createFetcher (/home/pi/MagicMirror/modules/MMM-PublicTransportHafas/node_helper.js:31:17)
at Class.socketNotificationReceived (/home/pi/MagicMirror/modules/MMM-PublicTransportHafas/node_helper.js:17:14)
at Socket. (/home/pi/MagicMirror/js/node_helper.js:113:11)
at Socket.emit (events.js:198:13)
at /home/pi/MagicMirror/node_modules/socket.io/lib/socket.js:528:12
at process._tickCallback (internal/process/next_tick.js:61:11)
^Cevents.js:174
throw er; // Unhandled 'error' event
^
A can find the reason. The code seems to be ok. (hands over a static string to the method)
My configuration:
{
module: "MMM-PublicTransportHafas",
position: "bottom_right",
config: {
stationID: "00903736", // Replace with your stationID!
stationName: "Holzwickede Bahnhof", // Replace with your station name
direction: "", // Show only departures heading to this station. (A station ID.)
ignoredLines: [], // Which lines should be ignored? (comma-separated list of line names)
excludedTransportationTypes: ["bus"], // (comma-separated list of types) possible values: StN for tram, BuN for bus, s for suburban
timeToStation: 8, // How long do you need to walk to the next Station?
timeInFuture: 60,
showColoredLineSymbols: true, // Want colored line symbols?
useColorForRealtimeInfo: true, // Want colored real time information (timeToStation, early)?
showTableHeadersAsSymbols: true, // Table Headers as symbols or text?
maxUnreachableDepartures: 0, // How many unreachable departures should be shown?
maxReachableDepartures: 7, // How many reachable departures should be shown?
customLineStyles: "", // Prefix for the name of the custom css file. ex: Leipzig-lines.css (case sensitive)
showOnlyLineNumbers: false // Display only the line number instead of the complete name, i. e. "11" instead of "STR 11"
}
},
I did the following:
git clone ....
git checkout greenkeeper/hafas-client-5.1.1
npm install
Master didn't compile with version conflicts.
When i disable the module MM starts and runs normally.
Any idea?
Thanks in advance.
The text was updated successfully, but these errors were encountered:
Author of hafas-client, the library used by MMM-PublicTransportHafas, here.
hafas-client@5 has breaking changes over the currently used hafas-client@2. This means that you cannot upgrade from hafas-client@2 to hafas-client@5 without adapting the MMM-PublicTransportHafas code. This is why it complains about a missing userAgent argument.
The greenkeeper/hafas-client-5.1.1 branch has been created by a bot, which did obviously not adapt the MMM-PublicTransportHafas code to hafas-client@5. For a German discussion on upgrading hafas-client, check #67. This repo doesn't seem to be maintained though.
Hi.
I just installed a clean new version of MagicMirror, added this module (from the greenkeeper/hafas-client-5.1.1 branch) modified the example configuration with my own station ID and started MM.
But the module crashes with the following message:
[17:46:00.564] [ERROR] TypeError: userAgent must be a string
at createClient (/home/pi/MagicMirror/modules/MMM-PublicTransportHafas/node_modules/hafas-client/index.js:31:9)
at new HafasFetcher (/home/pi/MagicMirror/modules/MMM-PublicTransportHafas/core/HafasFetcher.js:29:24)
at Class.createFetcher (/home/pi/MagicMirror/modules/MMM-PublicTransportHafas/node_helper.js:31:17)
at Class.socketNotificationReceived (/home/pi/MagicMirror/modules/MMM-PublicTransportHafas/node_helper.js:17:14)
at Socket. (/home/pi/MagicMirror/js/node_helper.js:113:11)
at Socket.emit (events.js:198:13)
at /home/pi/MagicMirror/node_modules/socket.io/lib/socket.js:528:12
at process._tickCallback (internal/process/next_tick.js:61:11)
^Cevents.js:174
throw er; // Unhandled 'error' event
^
A can find the reason. The code seems to be ok. (hands over a static string to the method)
My configuration:
{
module: "MMM-PublicTransportHafas",
position: "bottom_right",
config: {
stationID: "00903736", // Replace with your stationID!
stationName: "Holzwickede Bahnhof", // Replace with your station name
direction: "", // Show only departures heading to this station. (A station ID.)
ignoredLines: [], // Which lines should be ignored? (comma-separated list of line names)
excludedTransportationTypes: ["bus"], // (comma-separated list of types) possible values: StN for tram, BuN for bus, s for suburban
timeToStation: 8, // How long do you need to walk to the next Station?
timeInFuture: 60,
showColoredLineSymbols: true, // Want colored line symbols?
useColorForRealtimeInfo: true, // Want colored real time information (timeToStation, early)?
showTableHeadersAsSymbols: true, // Table Headers as symbols or text?
maxUnreachableDepartures: 0, // How many unreachable departures should be shown?
maxReachableDepartures: 7, // How many reachable departures should be shown?
customLineStyles: "", // Prefix for the name of the custom css file. ex: Leipzig-lines.css (case sensitive)
showOnlyLineNumbers: false // Display only the line number instead of the complete name, i. e. "11" instead of "STR 11"
}
},
I did the following:
git clone ....
git checkout greenkeeper/hafas-client-5.1.1
npm install
Master didn't compile with version conflicts.
When i disable the module MM starts and runs normally.
Any idea?
Thanks in advance.
The text was updated successfully, but these errors were encountered: