-
Notifications
You must be signed in to change notification settings - Fork 104
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
New user: Plugin doesn't work #127
Comments
Hi and welcome! |
I'm not behind a proxy nor does my machine have a software firewall running. We have a corporate firewall but it does very little to outbound traffic. I just tried disabling that temporarily and the behavior is unchanged. I found those other issues you mentioned when trying to diagnose the problem. I'm happy to dig deeper if you've got pointers. I'm on Ubuntu 14.04. |
@traskrogers Thanks for offering to help. I found the following on StackOverflow: |
I have done a "pip3 install thrift" and made the modifications per the StackOverflow thread. It changes the error message (shown below). Following another SO thread I changed line 122 in TBinaryProtocol.py from I'm not sure how the Python module on disk interacts with the Sublime plugin. There was no "thrift" module installed on my system prior to me installing it manually but the Sublime plugin still seemed to work. Is it embedded within the sublime plugin? How do I ensure my changes on disk have an effect on the sublime plugin? I got differing behaviors when I uninstalled/reinstalled the sublime plugin and when I just did a restart of sublime or retried certain Evernote plugin commands. Error after the changes outline in the SO post you linked: TypeError: encoding or errors without a string argument
|
Hi, thanks for trying this. The changes suggested in the SO thread I linked should be done on the files under |
Thanks for the tips. My changes are now being reflecting as I expect they would. Initial error with fresh clone: Evernote: unpack requires a bytes object of length 1 Following the SO post I get the error below. Note that it seems like TBinaryProtocol.py has been modified within the Evernote plugin already (the line 122-123 changes). I simply overwrote that function to be as the SO post expects it to be (and like a fresh download of Thrift 0.9.3 is).
If I leave that section of code alone (lines 122-123) in TBinaryProtocol.py and do make the changes on line 223 I get this:
If I change nothing in TBinaryProtocol.py, but do leave the changes in TTransport.py I get the original error back: |
Ok. It is not clear which edits you are making.
If all this keeps failing I would revert back and try to replace every
making sure the definitions are included in the module. If this fails I would try to also test this in conjuction with the changes above. |
So I tested a few combinations of what you described (implementing pack/unpackStr). Didn't work. Here's an error:
While I was fooling with it I decided to grab the latest commit from the thrift git project and give it a try. It looks like they've gone a long way to working on compatibility issues with py3 but I still get problems. I had to find and drop the "six.py" module in the plugin "lib" dir to get it to run as well.
I think I'm done messing with this. Let me know if I can try anything else otherwise I'm going to drop it. |
Thanks a lot for trying. |
@traskrogers could you please do one more test for me?
and check that there is only one such module in ST's paths
to make sure no other plugin is injecting a different version of Thrift. Just a wild guess though 😞 |
Your gut was right. I had made a ".original" backup of the thrift library that was also getting pulled in. I re-did the tests and I end up with this traceback:
I fiddled for 20 minutes trying to blindly adjust things here and there in the evernote/edam library area. I didn't get much further. I feel like you've got the issue pretty narrowed down but I'm not sure where to best address it. I used some print statements to see that some strings come through TBinaryProtocol.py as "bytes" and some as type == str. It seems like perhaps the evernote library is expecting them to all be bytes. |
@bordaigorl same problem happened on my ST3 when i want to save evernote notes after some editing, but one thing must be noticed, not all notes could trigger such error. It seems related to content of evernote note. maybe it's useful and just FYI. BTW, is there any debugging method to investigate it deeply?
|
@bordaigorl @traskrogers I noticed that there're 2 headers in such note with some similar fields link below, it can be saved after 2 headers combined to 1 header. so my issue disappeared after making some changes to notes' header. In my ST3, 2 headers will cause update/save issue cetertainly. :-)
|
@xdutaotao Wow Thank you so so so much for tracking this one down!!! |
Same issue for me on both my laptops. I'll try reinstalling the package after the next update. Evernote plugin error: unpack requires a bytes object of length 1 If it is helpful in any way here is the output from the last two tests @bordaigorl suggested.
|
@jastuccio can I ask you if you are using multiple metadata headers or |
I don't think so. My new note header is just:
|
@jastuccio ok I think I understand what is going on now.
Now, bug number 2 is a bug of the markdown library and can be easily fixed. Bug number 1 however is buried deep in the Evernote SDK for Python 3 (so it would seem) and I do not know how to fix it because:
I am very puzzled also because I am running the plugin on exactly the same version and platform as @jastuccio and I do not have any issues. |
I am connecting from home. The OSX built in firewall was off at the time. You mentioned markdown library. I have a different error in my console a few messages back. I cant remember what sublime-evernote action triggered it.
|
I had this error after trying to reinstall the plugin on a new OS - it turns out I was supplying the notestore as the developer token (since I had previously generated a token, Evernote didn't show the old token on the page). The solution was to revoke the old token and generate a new one. In case this helps anyone. |
@jastuccio @traskrogers coul you try an see if what @ktleary is suggesting applies to you? |
worked for me as well! thanks! |
I randomly had the idea that Evernote would be much better if I could use it through Sublime and a few searches led me here. Wonderful!
A fresh setup on Sublime 3 (build 3103) doesn't work for me. I've setup the dev key.
If I create a new note and then try to "send as new note" I get the following errors in the console:
The text was updated successfully, but these errors were encountered: