simplenote-vim / simplenote.py

Python API wrapper for the Simplenote web service
http://readthedocs.org/docs/simplenotepy/en/latest/api.html
MIT License
173 stars 23 forks source link

failed to interact with the simplenote server #21

Open acidbourbon opened 7 years ago

acidbourbon commented 7 years ago

Hi, I don't seem to be able to perform basic interactions with the simplenote server ... this script used to work some months ago ...

import simplenote sn = simplenote.Simplenote("me@me.com", "mypassword") note_list = sn.get_note_list() print( "note list length: {0:d}".format(len(note_list[0])) ) note list length: 0 sn.add_note({'content':'a new note from python', 'tags': 'scripted'}) (URLError(SSLError(8, '_ssl.c:504: EOF occurred in violation of protocol'),), -1)

did Simplenote.com change their protocol?

atomicules commented 7 years ago

The old/original api still works for me. For instance the tests here still run fine (excepting the occasional get_list_length glitch). I do wonder if they are blocking newer users from it though, but you say this used to work?

acidbourbon commented 7 years ago

On 21.01.2017 13:26, atomicules wrote:

The old/original api still works for me. For instance the tests here still run fine (excepting the occasional get_list_length glitch). I do wonder if they are blocking newer users from it though, but you say this used to work?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mrtazz/simplenote.py/issues/21#issuecomment-274258694, or mute the thread https://github.com/notifications/unsubscribe-auth/ADxOMvRJx2A7pvYlIcieoY4GHatm4af4ks5rUflwgaJpZM4LkhNb.

Jup. It used to work. I used simplenote.py to convert all my notes from tomboy to SimpleNote. Thanks for coming back to me, I appreciate :)

Strangely "nvpy" (a graphical third party SimpleNote client) which claims to be built around simplenote.py, works fine.

However, when I try to use the python module on my raspberry pi (with raspbian) it has the same bug as on my Notebook with Linux Mint,

i.e. the login and the get list commands return immediately with no results. Apart from that, have a great weekend! Cheers, Micha

atomicules commented 7 years ago

I wonder if this could be a python version issue? Or json module issue?

Might be a tricky one to track down. Simplenote.vim uses simplenote.py as well and there was an issue opened there where a couple of people had odd connection issues, but for most it seems to work fine.

JALusk commented 7 years ago

I can confirm that I'm getting the same issue as @acidbourbon when using python 2.7.6 on Ubuntu 14.04. I installed simplenote from pip.

However, when I install simplenote in a python 3.4.3 virtualenv using pip, things work fine.

Since my vim is compiled against python2.7, I'm getting Error: Unable to connect to server. when I try to run :SimplenoteList

JALusk commented 7 years ago

I'm also getting test failures on Python 2.7.6:

test_note_get_previous_version (test_simplenote.TestSimplenote) ... ok test_note_with_plus_signs (test_simplenote.TestSimplenote) ... ok test_simplenote_add_note_content (test_simplenote.TestSimplenote) ... ok test_simplenote_add_note_object (test_simplenote.TestSimplenote) ... ok test_simplenote_auth (test_simplenote.TestSimplenote) ... FAIL test_simplenote_delete_note (test_simplenote.TestSimplenote) ... ok test_simplenote_failed_auth (test_simplenote.TestSimplenote) ... FAIL test_simplenote_first_note (test_simplenote.TestSimplenote) ... ok test_simplenote_get_list_length (test_simplenote.TestSimplenote) ... ok test_simplenote_get_list_with_tags (test_simplenote.TestSimplenote) ... ok test_simplenote_is_unicode (test_simplenote.TestSimplenote) ... ok test_simplenote_second_note (test_simplenote.TestSimplenote) ... ok test_simplenote_trash_note (test_simplenote.TestSimplenote) ... ok test_simplenote_update_note (test_simplenote.TestSimplenote) ... ok

====================================================================== FAIL: test_simplenote_auth (test_simplenote.TestSimplenote)

Traceback (most recent call last): File "/home/jlusk/src/simplenote.py/tests/test_simplenote.py", line 46, in test_simplenote_auth self.assertNotEqual(None, token) AssertionError: None == None

====================================================================== FAIL: test_simplenote_failed_auth (test_simplenote.TestSimplenote)

Traceback (most recent call last): File "/home/jlusk/src/simplenote.py/tests/test_simplenote.py", line 50, in test_simplenote_failed_auth self.assertRaises(simplenote.SimplenoteLoginFailed, s.get_token) AssertionError: SimplenoteLoginFailed not raised


Ran 14 tests in 9.891s

I had to comment out test_simplenote_get_list_length_longer_than_note_fetch_length() because it would hang the test suite.

atomicules commented 7 years ago

Bizarre. I just ran the tests again with 2.7.11 and all worked fine. I wonder if this is a SNI thing and therefore python 2.7.9 onwards is needed?

atomicules commented 5 years ago

Doing a bit of a review of older issues. I'm not personally going to work this one and I'm unsure what the exact issue is.

It could be TLS related, in which case see #23

Or it could no longer be relevant now we've switched to the Simperium API.