elizabeth icon indicating copy to clipboard operation
elizabeth copied to clipboard

invalid document source @#[line:0,col:undefined] Please help, I got this to work once, but after reinstall, I get the same error...

Open dcorleto opened this issue 10 years ago • 3 comments

Welcome to Elizabeth, your Moves.app exporter!

Using DayOneExport to export 7 days!

invalid document source @#[line:0,col:undefined]

TypeError: Cannot read property 'documentElement' of undefined at Object.parse (/Users/dan/Documents/elizabeth-master/node_modules/dayone/node_modules/plist/lib/parse.js:45:10) at DayOneEntry.fromOutputFormat as fromFile at /Users/dan/Documents/elizabeth-master/node_modules/dayone/lib/DayOne.js:49:19 at Array.forEach (native) at DayOne.list (/Users/dan/Documents/elizabeth-master/node_modules/dayone/lib/DayOne.js:47:30) at DefaultPlugin.loadEntries (/Users/dan/Documents/elizabeth-master/lib/output/DayOneExport.js:203:17) at DefaultPlugin.exportDay (/Users/dan/Documents/elizabeth-master/lib/output/DayOneExport.js:79:10) at /Users/dan/Documents/elizabeth-master/lib/Elizabeth.js:143:17 at Request._callback (/Users/dan/Documents/elizabeth-master/node_modules/moves-api/lib/MovesApi.js:126:13) at Request.self.callback (/Users/dan/Documents/elizabeth-master/node_modules/request/request.js:123:22)

dcorleto avatar Aug 16 '14 12:08 dcorleto

I am experiencing this issue as well, exact same error.

CaptainValor avatar Aug 24 '14 04:08 CaptainValor

This seems to be related to empty files lying in the DayOne entries directory: pwaldhauer/dayone#10

enplotz avatar Sep 24 '14 09:09 enplotz

you can just find the DayOneEntry.js and remove the line

var entry = plist.parse(fs.readFileSync(filename, 'utf8'));

and then add below lines at the same place:

var file = fs.readFileSync(filename, 'utf8');

if (!file) {
    return null;
}
var entry = plist.parse(file);

chenhang avatar Oct 09 '14 07:10 chenhang