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

Error updating note #184

Open
kimaldis opened this issue Jun 10, 2017 · 4 comments
Open

Error updating note #184

kimaldis opened this issue Jun 10, 2017 · 4 comments

Comments

@kimaldis
Copy link

I pull a note from Evernote to Sublime using search then immediately update it and I get the error below. The note contained divs when it arrived in sublime so obviously div is allowed somehow. I suspect it's because the contents of the note were pasted from a web page. Also, I'm using the experimental back tick code blocks in the note. This feature seems to add divs to the note

Any thoughts on how to deal with this?

_Evernote complained:

The contents of the note are not valid.
The inline HTML tag 'div' is not allowed in Evernote notes._

@bordaigorl
Copy link
Owner

It would be extremely helpful if you could produce a small note that triggers the same unwanted behaviour so I can debug it.
Turn the debug setting to true and then check the ST console for debugging information.
Remember to strip any personal info that may be present in the log and paste the note and the log here.

@nonbeing
Copy link

nonbeing commented Oct 1, 2018

@bordaigorl First of all, thank you for this amazing plugin. I've been using it for years, and I <3 it!

I have a repro of the problem reported here and also in #207.

I turned debug to true in my Evernote.sublime-settings file. I simply opened an existing Evernote note in Sublime, and then tried to update it back to Evernote.

This fails, please see this screenshot:
error screenshot

This is a note that was created in Evernote and contains a "code block" that was created using Evernote's relatively-new "code block" feature:
code block

The code-block is probably adding the offending divs.

Here are the corresponding ST console logs:

Package Control: Skipping automatic upgrade, last run at 2018-10-01 17:26:46, next run at 2018-10-01 18:26:46 or after
Evernote: <p>First of all, ensure you're using at least v1.5.0 of the <code style="color: #000000; font-family: monospace,monospace; padding: 0.1em 0.2em; margin: 0.1em; font-size: 85%; background-color: #F5F5F5; border-radius: 3px; border: 1px solid #cccccc;">google-cloud-bigquery</code> python package:</p>

<div style="box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, "Courier New", monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902);-en-codeblock:true;">

<div style="box-sizing: border-box;">

$ bq-python pip list | grep bigquery</div>

<div style="box-sizing: border-box;">

google-cloud-bigquery 1.5.0</div>

</div>

Evernote: ['python', 'bigquery', 'gcp']
Evernote error: [Enml validation]
	Element type "div" must be followed by either attribute specifications, ">" or "/>".
	Last command:  {}
	BEFORE SUBMITTING AN ISSUE (https://github.com/bordaigorl/sublime-evernote/issues):
	  1. Enable the `debug` setting in your Evernote.sublime-settings file and try again. If the problem persists take a note of the output in the console.
	     Make sure you delete personal information (e.g. Developer Token) from the output before posting it in an issue.
	  2. Check the wiki at https://github.com/bordaigorl/sublime-evernote/wiki
	  3. Search for similar issues at https://github.com/bordaigorl/sublime-evernote/issues?q=is%3Aissue
	(Evernote plugin v2.7.2, ST 3176, Python 3.3.6, osx x64, debug)

Would be grateful if you could look into this. Thank you!

@bordaigorl
Copy link
Owner

@nonbeing Wow thanks a lot for looking into this, this is super helpful.
I cannot promise I'll fix this too soon but I'll try!

@bordaigorl
Copy link
Owner

@kimaldis I created a PR that adds support for the new codeblocks.
I cannot promise it will work or continue working in the future: Evernote does not document these features!
I would be grateful if you could test the PR.

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

3 participants