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

Cannot access jrnl files. No recommended backend was available #407

Closed
dastagg opened this issue Feb 1, 2016 · 6 comments
Closed

Cannot access jrnl files. No recommended backend was available #407

dastagg opened this issue Feb 1, 2016 · 6 comments
Labels
bug Something isn't working 🔒 Outdated

Comments

@dastagg
Copy link

dastagg commented Feb 1, 2016

Running on ArchLinux.
The default jrnl file is encrypted.
What are the keyring backends it is looking for?

~ ❯❯❯ jrnl --edit ⏎
Traceback (most recent call last):
File "/usr/bin/jrnl", line 9, in
load_entry_point('jrnl==1.9.8', 'console_scripts', 'jrnl')()
File "/usr/lib/python3.5/site-packages/jrnl/cli.py", line 194, in run
journal = Journal.Journal(journal_name, **config)
File "/usr/lib/python3.5/site-packages/jrnl/Journal.py", line 39, in init
self.open()
File "/usr/lib/python3.5/site-packages/jrnl/Journal.py", line 105, in open
journal = util.get_password(keychain=self.name, validator=validate_password)
File "/usr/lib/python3.5/site-packages/jrnl/util.py", line 37, in get_password
pwd_from_keychain = keychain and get_keychain(keychain)
File "/usr/lib/python3.5/site-packages/jrnl/util.py", line 56, in get_keychain
return keyring.get_password('jrnl', journal_name)
File "/usr/lib/python3.5/site-packages/keyring/core.py", line 42, in get_password
return _keyring_backend.get_password(service_name, username)
File "/usr/lib/python3.5/site-packages/keyring/backends/fail.py", line 18, in get_password
raise RuntimeError("No recommended backend was available")
RuntimeError: No recommended backend was available
~

@roman-holovin
Copy link

Same, this happened after updating python-keyring to the latest version.

@dastagg, you can "fix" it via rollbacking python-keyring - sudo pacman -U /var/cache/pacman/pkg/python-keyring-7.3-1-any.pkg.tar.xz

@dastagg
Copy link
Author

dastagg commented Feb 2, 2016

Thanks! That worked, but I'm not going to close this issue. Not sure why it doesn't work with python-keyring 8.2-1 so I'll leave this open and check the next time jrnl updates.

@maebert
Copy link
Contributor

maebert commented Feb 10, 2016

Thanks, I locked the version to 7.3 while figuring out how what's going on in 8.2.

@dastagg
Copy link
Author

dastagg commented Feb 25, 2016

Just to follow-up:

Just upgraded python-keyring to 8.4.1-1 and python-keyrings-alt 1.1.2016123-1 and jrnl is working fine.

@hoptimumthreat
Copy link

This did the trick for me.

apt-get install python-keyring

maebert pushed a commit that referenced this issue Apr 29, 2019
* Require config arguments

* Use PyXDG to save config and journal in XDG dirs

This change also hides the CONFIG_PATH state information entirely within
the install module. Therefore, the cli module does not have to care about
checking existence of files and paths.

* Export to xml

* Better unicode mock support

* Fixes unicode errors in XML export

* Cleans up entry

* Docs

* YAML configs

See #184, #230, #197

* Fixes config tests

* Fix config writing for python 3

* fix call to entry_to_md()

* Make Journal a general interface

This change moves the loading and saving mechanisms into its own
Plain- and EncryptedJournal subclasses for easier maintenance and lazy loading
of all the crypto modules.

* Move and remove imports in utils

* Remove circular dependency

* Fix failing behave tests

* Deprecate config.password

* Remove deprecated tests

* Upgrade scaffolding

* Basic support for cryptography.io

Still needs better hash function

* Doc changes

* Upgrade prompt for encrypted jrnls

* Uses PBKDF2-SHA256 instead of plain SHA256

Fixes #192

* Use 'version' in configs

* Converts tests to YAML

* Work on cryptography

* Plugin architecture

* Now the list of export types in --help is generated from the plugins.

* Added support for importing entries.

* Made Journal.import_ more concise.

* Now the importer reads from standard input using util.py23_read().

* Added basic logging feature to understand how is configuration loaded

Conflicts:

	jrnl/cli.py
	jrnl/util.py

* Hardcoded salt to fix crypto

* Make backup of config when upgrading

Fixes #307

* Return config after install

Fixes #297

* Properly initialise journal files after creating them

* Introduce legacy classes

* Cuddle timestamp in brackets to fix #318

* Legacy Journal with old timestamps

* Upgrade old time stamps to fix #317

* Fix conflicting requirements

Fixes #296

* Cleanup and more logging

* Fix creating non-existent journals

* Update all tests to new time format

* Export DayOne UUID in json

Fixes #333

* Tests for #333

* Bilingual meta classes

* Python 3 fixes :)

* Encryption reads and writes in binary mode

* More encoding madness

* Fix parsing issue

* Tests for parsing issue fix

* TXT extension for temp files

* Add missing dependencies pyyaml and pyxdg

* Fix: dateutil conflict because python-dateutils was already added to the conditional section.

* Add single letter alias -s for option --short

--short was being used in a test for date logic, but I added a second
test for explicitness.

* Fix breaking test submitted in b2a7d1f.

* Fix improper charset handling in PY2 path of u(x)

Knowing fully that I may have just added another layer of impropriety, the above line fixed the charset errors I was getting.

I'll illustrate this change with an example string `Charšet`, entered (e.g. through stdin) in UTF-8 encoding.
To the best of my knowledge, the previous version would first have encoded this string to `Char\xc5\xa1et` (i.e., it encoded each byte not in ascii range as a hex escape code), and then have parsed this string to `Charšet` (i.e. after "r" it sees Unicode code point U+00c5 and U+00a1).

My version simply takes this str for what it is: an UTF-8 representation of the unicode string `Charšet`.

* Don't pin to a specific version of `cryptography`

* Unable to run `cli.py` as a standalone script due to relative imports

* Update Markdown exporter documentation.

* Update `Tag` exporter code documentation.

* Removes leading 'b' on slugs in Python 3

* Change heading levels on Markdown export depending on if it is to a consolidated file or to individual files.

* Increase heading levels on Markdown export

* Warn if increasing headings goes past H6

Only warn once per entry.

* Don't relay on `colorama` for ANSI color codes

* Add testing for increasing Headings on Markdown export

* Add YAML export

* Check for heading level error

* Check for heading level error

* Update .gitignore

* Make the tests pass

* grr...fix typo

* Include `plugins` in eggs

* Fix test arg parsing

* Split tests

* Consolidate requirements

* Tests for #343

* Warn user if attempting to write to default journal but not configured

Fixes #343

* Close temp file before deleting it.

* Name file handle if we're going to us it

Conflicts:
	jrnl/util.py

* Fix weird character at the front of the line...

* Remove ;

* Allow editor config value to be either list or str

* Add documentation on advanced editor config

* Add jrnl.plugins to the list of installed packages.

Without this the installed jrnl will not run.

Conflicts:
	setup.py

* Now the list of import types in --help is generated from the plugins.

* Merge branch 'pr/326' into 2.0-rc1

* Fix for #322

* Fix for #332

* Fix that goddamn timezone test

* [YAML export] only increase headings by one level

* [YAML export] remove lines that simply list tags

* [CLI] colour code 'no editor' error message

* [Util] delete old, unused code

* [Dayone] Add Creator section to dayone import and YAML export

* code formatting

* Fixes #348

Also fixes #322 on windows.

* [Dayone] fix reading dates off edited dayone entries

* [Dayone] allow variable length dates on edited Dayone entries

* [Dayone] cut extended attributes for now

* [Dayone] clean up date code

* Colorize error and warning messages

* [CLI] display instructions to enter an entry on the command line when no editor is set

* Support for templates

* Update tests for templates

* Fix XML export

* --export text doesn't indent

Fixes #373

* Seperation of title and entry is now purely virtual.

Fixes #360

* Merged PR

* Drop whitespace in print

Fixes #222 and #376

* Remove references to jrnl[encrypted]

* Unicode literals in util

* Byte encoding for getpass

Fixes #392 and #393

* Doc update on HISTIGNORE

Fixes #394

* Docs on Alfred integration

Fixes #364

* Expand vars and user tilde for upgrade backup

* Open config_path as utf-8

* Update dependencies and lock versions on keyring and cryptography. Fixes #407

* Clean up text wrapping once and for all

* Fully strip title and body after SENTENCE_SPLITTER search

* User defined indent character (#419)

Make indent character configurable.

* Exports

* Update Cryptography

Fixes SSL issues described in
pyca/cryptography#2750

* Upgrade to cryptography 1.4

* Fix Keyring tests

* Indent character optional

* Fix JSON export

* Template exporting FTW

* Clean up

* Fix behave tests by adding asteval dependency (#469)

* Fix python2 error in template_explorer.py (#471)

If template_explorer.py was imported in python2, it would fail because
it uses unicode_literals which would ultimately cause passing an unicode
string as the first argument to the 'type' built-in function.

This commit fixes this by converting the unicode to string before it is
passed to the 'type' function.

Fixes #456

* Catch keyboard interrupt when opening journal (#476)

If the journal is encrypted, jrnl asks for a password using the
getpass.getpass function. If user presses the keyboard interrupt (e.g.
ctrl+c) during the password prompt, jrnl crashes and prints a stack
trace. This however is not very user friendly.

This commit adds a check for KeyboardInterrupt Exception and prints a
message whenever this exception occurs and exits. Stack is no longer
printed.

Fixes #450

* Remove --use-mirrors switch from travis setup (#477)

The --use-mirrors pip switch does not work since pip 7.0.0. This caused
travis builds to fail.

This commit removes the --use-mirrors switch.

* minor typo fixes (#515)

* Don't pin cryptography

* Fix some testing issues

* Work if timezone is UTC

* use right configuration for a test

* deal with DST (re-fix bug)

* Travis-CI: Allow development version of Python to fail gracefully

* Be consistent with __future__ imports

* Fix failing tests

* Sort Imports
@maebert maebert mentioned this issue Nov 8, 2019
7 tasks
@lock
Copy link

lock bot commented May 21, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot added the 🔒 Outdated label May 21, 2020
@lock lock bot locked as resolved and limited conversation to collaborators May 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working 🔒 Outdated
Projects
None yet
Development

No branches or pull requests

4 participants