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

Evernote Error: 2 - Note.title #21

Closed
cancastilho opened this issue Apr 7, 2017 · 7 comments
Closed

Evernote Error: 2 - Note.title #21

cancastilho opened this issue Apr 7, 2017 · 7 comments

Comments

@cancastilho
Copy link

I can use 'ever new', 'ever open', 'ever search', but cant use 'ever publish', because it will throw an Evernote Error: 2 - Note.title.
When I used "ever token" I chose 'Other' and included my own generated token.

How can I fix this?

@michalyao
Copy link
Owner

michalyao commented Apr 7, 2017

Hi, did you specific the note title? Could you please show me the metadata? I mean the

---
title:
tags:
notebook:
---

@cancastilho
Copy link
Author

cancastilho commented Apr 7, 2017

No matter what I write, the error will occur. Here is a sample:

---
title: test
tags: teste1
notebook: base
---

# Just a test

@michalyao
Copy link
Owner

The error message is returned by Evernote Cloud API.

BAD_DATA_FORMAT "Note.title" - invalid length or pattern.

I am going to use my international account to test this. By the way, did you use ever publish to create a new one or update an existing one? Could you please restart the VS Code, open a note first (use a test one), edit it and then publish?

@michalyao
Copy link
Owner

@cancastilho Hi, I used my Evernote international account to test this, but it did not show the error message as you reported. Here is the result. Please follow the steps bellow and check again:

  1. Check the token and noteStoreUrl in the configuration.
  2. Restart the VS Code.
  3. Use ever new to create an empty note.(an Untitled file, do not save it.)
  4. Edit it and use ever publish.

image
image

@cancastilho
Copy link
Author

cancastilho commented Apr 7, 2017

Hi. I've just found the problem. I'm running visual studio code on Windows 10. In Windows the End-of-line character is \r\n. This will cause problem on line 36 of your extension.js, in which states:

let metaArray = metadataStr.split('\n');

To fix the problem one can go to File > Preferences > Settings and change the EOL config using

 "files.eol": "\n"

see microsoft/vscode#2957

@michalyao
Copy link
Owner

@cancastilho That's great! May I close this issue?

@cancastilho
Copy link
Author

For sure. Thanks. That's a great extension.

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

No branches or pull requests

2 participants