-
Notifications
You must be signed in to change notification settings - Fork 48
Cant' edit with geeknote #94
Comments
What version of geeknote are you using? |
Hey, ========================================= test session starts ==========================================
Let me know if you might need something else from me. |
I cannot reproduce this error. Would you test with python2? Under python2, I see this:
|
Hi, Geeknote version 2.0.14 When I run py.test in the git repository, I get
EDIT:
|
This is helpful, @Mladia. |
And also
Also
This is strange, because everything works on my Fedora system, as it should be. |
Thanks for providing the example, @Mladia. Regrettably, I cannot reproduce the error.
|
Hi, I don't know, if this would help. I printed the variable
EDIT: I removed the verification if |
Thanks for trying that. It looks like all strings are being treated as
unicode on your system, which I thought was a change introduced in Python3,
not Python2.
I'm still not able to reproduce this on my machines, and I didn't write
that code, so I can't explain why the check is there.
As an experiment, you might try removing the check so that the exception is
not raised. If the code continues to execute, is there another error that
occurs?
Maybe the check should simply be updated to allow for both string and
unicode types.
Jeff
…On Thu, Jul 19, 2018 at 3:44 PM Mladia ***@***.***> wrote:
Hi, I don't know, if this would help. I printed the variable content
before exception test
➜ geeknote show example1
################### URL ###################
NoteLink: https://www.evernote.com/shard/s259/nl/33061411/66d2511b-4f4f-4cd9-912b-ed724bb0602d
WebClientURL: https://www.evernote.com/Home.action?#n=66d2511b-4f4f-4cd9-912b-ed724bb0602d
################## TITLE ##################
example1
=================== META ==================
Notebook: general
Created: 2018-07-20
Updated: 2018-07-20
|||||||||||||||| REMINDERS ||||||||||||||||
Order: None
Time: None
Done: None
----------------- CONTENT -----------------
This is an example note
~ took 2s
➜ geeknote edit example1
: Connecting to Evernote...content
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE en-note SYSTEM "http://xml.evernote.com/pub/enml2.dtd">
<en-note><p>This is an example note</p>
</en-note>
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/geeknote/geeknote.py", line 1423, in main
Notes().edit(**ARGS)
File "/usr/lib/python2.7/site-packages/geeknote/geeknote.py", line 1024, in edit
result = self._editWithEditorInThread(inputData, note, raw=raw, rawmd=rawmd)
File "/usr/lib/python2.7/site-packages/geeknote/geeknote.py", line 838, in _editWithEditorInThread
editor = Editor(editor_userprop, note.content, noteExt_userprop, raw)
File "/usr/lib/python2.7/site-packages/geeknote/editor.py", line 286, in __init__
"of string, '%s' given." % type(content))
Exception: Note content must be an instance of string, '<type 'unicode'>' given.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#94 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AADeMLFEXnlWrl4Z_MxHDFSh9GnPM_g9ks5uIQu7gaJpZM4Uy0w5>
.
|
I patched it up a bit, it works now. I had to place a couple of
Those are the changes, that I've made. Note, that I have not tested everything in geeknote, to see if it works and I don't normally programm in python, so make this changes only if you have the same problems. |
Hey Guys, thanks for handling this issue, saved an Evernotelife. Ran into the same issue recently, added @Mladia code and the download worked smoothly again, but i had trouble uploading a modified note afterwards. logging.debug("Update note : %s", note)
if not shared:
note.content = note.content.decode('utf-8') # <-- Row 443 - Added decoding before updating
self.getNoteStore().updateNote(self.authToken, note)
else:
self.sharedNoteStore.updateNote(self.sharedAuthToken, note)
return True |
I was trying to edit. Managed to get my developer token and login. The search feature works, the show feature works, but editing not so much
Can someone help me out here?
The text was updated successfully, but these errors were encountered: