snowdd1 / knx-ets5-ga-reader Goto Github PK
View Code? Open in Web Editor NEWReader for ETS5 Group Address Exports (XML format)
Reader for ETS5 Group Address Exports (XML format)
If you just clone the project, do a npm install and run the script as described in readme.md it will end up with the following error:
node:events:505
throw er; // Unhandled 'error' event
^
TypeError [ERR_INVALID_CALLBACK]: Callback must be a function. Received 'utf-8'
←[90m at maybeCallback (node:fs:177:3)←[39m
←[90m at Object.writeFile (node:fs:2118:14)←[39m
at D:\knx-ets5-ga-reader-master\test-file.js:54:8
at Parser.<anonymous> (D:\knx-ets5-ga-reader-master\node_modules\←[4mxml2js←[24m\lib\parser.js:304:18)
←[90m at Parser.emit (node:events:527:28)←[39m
at SAXParser.onclosetag (D:\knx-ets5-ga-reader-master\node_modules\←[4mxml2js←[24m\lib\parser.js:262:26)
at emit (D:\knx-ets5-ga-reader-master\node_modules\←[4msax←[24m\lib\sax.js:624:35)
at emitNode (D:\knx-ets5-ga-reader-master\node_modules\←[4msax←[24m\lib\sax.js:629:5)
at closeTag (D:\knx-ets5-ga-reader-master\node_modules\←[4msax←[24m\lib\sax.js:889:7)
at SAXParser.write (D:\knx-ets5-ga-reader-master\node_modules\←[4msax←[24m\lib\sax.js:1436:13)
Emitted 'error' event on Parser instance at:
at Parser.exports.Parser.Parser.parseString (D:\knx-ets5-ga-reader-master\node_modules\←[4mxml2js←[24m\lib\parser.js:327:16)
at Parser.parseString (D:\knx-ets5-ga-reader-master\node_modules\←[4mxml2js←[24m\lib\parser.js:5:59)
at D:\knx-ets5-ga-reader-master\test-file.js:25:10
←[90m at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3)←[39m {
code: ←[32m'ERR_INVALID_CALLBACK'←[39m
}
To be compatible with newest node version and the current fs
package you need to specify a callback function like:
fs.writeFile(__dirname + '/'+ config.niceReadableTestFile, JSON.stringify(groupAddresses, undefined, 4), 'utf-8', function(err) {
if(err) {
console.log('Cant write to file');
}
});
Hello Snowdd1.
Ignore this please. I made a mistake. I thought your reader is also for the knx protocol xml file.
I am sorry.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.