node-irsdk icon indicating copy to clipboard operation
node-irsdk copied to clipboard

there is a character encoding issue. Could you please fix it?

Open iamisti opened this issue 6 years ago • 4 comments

js-irsdk: yaml error: YAMLException: the stream contains non-printable characters at line 822, column 29: UserName: Emircan Coşkun ^ (anonymous) @ JsIrSdk.js:421 processImmediate @ internal/timers.js:439 JsIrSdk.js:421

iamisti avatar Nov 29 '19 19:11 iamisti

Apparently they already fixed that, so it should not show for the next release. The only thing we need is a new release :)

iamisti avatar Dec 06 '19 11:12 iamisti

Any update on this? Just received the same error. It prevents the SessionInfo from being loaded, which breaks my app. Here is the msg:

[0] js-irsdk: yaml error: 
[0] YAMLException: the stream contains non-printable characters at line 2601, column 31:
[0]        UserName: MikoÅaj Szymonek
[0]                                   ^

or as an image: image

@iamisti Did you fix it somehow? Looks like node-irsdk already uses the latest version of js-yaml (3.13.1)

sabifa avatar Mar 25 '20 16:03 sabifa

I've experienced this as well with the latest npm install "node-irsdk": "^2.1.6"

js-irsdk: yaml error: YAMLException: the stream contains non-printable characters at line 1455, column 29: UserName: Ondřej Hašlar ^ image

BTW, node-irsdk is just the right level of data access for me. Nice work.

kenklin avatar Mar 26 '20 19:03 kenklin

Strangely enough, if I enter the names into a yaml file like that:

UserName: Emircan Co�kun
UserName2: MikoÅaj Szymonek
UserName3: Ond�ej Hašlar

and parse them with js-yaml (3.13.1) like so:

const yaml = require("js-yaml");
const fs = require("fs");

try {
  const doc = yaml.safeLoad(fs.readFileSync("test.yml", "utf8"));
  console.log(doc);
} catch (e) {
  console.log(e);
}

It works without any problem and prints the expected result: image So I guess that there is an invisible char that can't get parsed. I don't really know how to debug that problem though.. Is there a way to save the telemetry file before parsing? That way we could maybe actually see the char which causes the problem.

@apihlaja Any clue on this?

sabifa avatar Mar 31 '20 17:03 sabifa