tannercollin / standardnotes-fs

Mount your Standard Notes as a filesystem.
GNU General Public License v3.0
148 stars 12 forks source link

Debian Stretch #14

Closed morewithout closed 5 years ago

morewithout commented 5 years ago

Hi there,

Thanks for creating standardnotes-fs. I have it working perfectly on Mac OS. But I'm having problems with both the PyPi version and the git version on Debian Stretch:

The PyPi version installs okay but won't authenticate:

snfs ~/notes Please enter your Standard Notes username: himself@markhadfield.com Please enter your password (hidden): Traceback (most recent call last): File "/usr/local/bin/snfs", line 11, in sys.exit(main()) File "/usr/local/lib/python3.5/dist-packages/standardnotes_fs/standardnotes_fs.py", line 143, in main keys = sn_api.gen_keys(password) File "/usr/local/lib/python3.5/dist-packages/standardnotes_fs/api.py", line 38, in gen_keys password, pw_info['pw_salt'], pw_info['pw_cost']) File "/usr/local/lib/python3.5/dist-packages/standardnotes_fs/crypt.py", line 24, in pure_generate_password_and_key 'sha512', password.encode(), pw_salt.encode(), pw_cost, AttributeError: 'NoneType' object has no attribute 'encode'

The git version won't install:

sudo pip3 install --upgrade git+https://github.com/tannercollin/standardnotes-fs Collecting git+https://github.com/tannercollin/standardnotes-fs Cloning https://github.com/tannercollin/standardnotes-fs to /tmp/pip-ut8mtxvo-build Complete output from command python setup.py egg_info: Traceback (most recent call last): File "", line 1, in File "/tmp/pip-ut8mtxvo-build/setup.py", line 11, in long_description = fh.read() File "/usr/lib/python3.5/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 546: ordinal not in range(128)

----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-ut8mtxvo-build/

thanks in antcipation,

Mark

tannercollin commented 5 years ago

The PyPi version is out of date, so let's use the git version for now.

This is a strange error. Can you try updating pip and setuptools?

sudo pip3 install --upgrade setuptools pip

morewithout commented 5 years ago

Thanks for the quick reply. Unfortunately that hasn't fixed it. I'm now on the following versions and installation is still failing with the same error.

python 3.5.3 pip 18.1 setuptools 40.6.3

tannercollin commented 5 years ago

Alright, I was able to reproduce your bug with: export LANG=C; sudo pip3 install --upgrade git+https://github.com/tannercollin/standardnotes-fs

It's because your system's locale is set to ASCII instead of UTF-8.

This seems like a stupid issue related to pip, described here: https://github.com/pypa/virtualenv/issues/201#issuecomment-3145690

I fixed it in f2b635419d95ea2a996ceec795df6fa06ee0fa55 by forcing python to read the file as UTF-8.

Running sudo pip3 install --upgrade git+https://github.com/tannercollin/standardnotes-fs should work now! Thanks for the bug report.

morewithout commented 5 years ago

Now installs and works perfectly. Thanks :-)