Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
dcorleto opened this issue Aug 16, 2014 · 3 comments

Comments

@dcorleto
Copy link

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)

@CaptainValor
Copy link

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

@enplotz
Copy link
Contributor

enplotz commented Sep 24, 2014

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

@chenhang
Copy link

chenhang commented Oct 9, 2014

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);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants