I installed jrnl with pip3 install jrnl on Lubuntu 18.04. Seems to work but complains about keyrings.
$ jrnl -h
Error initializing plugin EntryPoint('Windows (alt)', 'keyrings.alt.Windows', None, Distribution('keyrings.alt', '3.0')).
Traceback (most recent call last):
File "/home/ryan/.local/lib/python3.6/site-packages/keyring/backend.py", line 163, in _load_plugins
init_func = ep.load()
File "/home/ryan/.local/lib/python3.6/site-packages/entrypoints.py", line 77, in load
mod = import_module(self.module_name)
File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/usr/lib/python3/dist-packages/keyrings/alt/Windows.py", line 9, in <module>
from . import file_base
File "/usr/lib/python3/dist-packages/keyrings/alt/file_base.py", line 13, in <module>
from keyring.util.escape import escape as escape_for_ini
ModuleNotFoundError: No module named 'keyring.util.escape'
Error initializing plugin EntryPoint('file', 'keyrings.alt.file', None, Distribution('keyrings.alt', '3.0')).
Traceback (most recent call last):
File "/home/ryan/.local/lib/python3.6/site-packages/keyring/backend.py", line 163, in _load_plugins
init_func = ep.load()
File "/home/ryan/.local/lib/python3.6/site-packages/entrypoints.py", line 77, in load
mod = import_module(self.module_name)
File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/usr/lib/python3/dist-packages/keyrings/alt/file.py", line 11, in <module>
from keyring.util.escape import escape as escape_for_ini
ModuleNotFoundError: No module named 'keyring.util.escape'
Error initializing plugin EntryPoint('pyfs', 'keyrings.alt.pyfs', None, Distribution('keyrings.alt', '3.0')).
Traceback (most recent call last):
File "/home/ryan/.local/lib/python3.6/site-packages/keyring/backend.py", line 163, in _load_plugins
init_func = ep.load()
File "/home/ryan/.local/lib/python3.6/site-packages/entrypoints.py", line 77, in load
mod = import_module(self.module_name)
File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/usr/lib/python3/dist-packages/keyrings/alt/pyfs.py", line 8, in <module>
from keyring.util.escape import escape as escape_for_ini
ModuleNotFoundError: No module named 'keyring.util.escape'
usage: jrnl [-h] [-v] [-ls] [-d] [-from DATE] [-until DATE] [-on DATE] [-and]
[-starred] [-n [N]] [--short] [--tags] [--export TYPE] [-o OUTPUT]
[--encrypt [FILENAME]] [--decrypt [FILENAME]] [--edit]
[[...]]
optional arguments:
-h, --help show this help message and exit
-v, --version prints version information and exits
-ls displays accessible journals
-d, --debug execute in debug mode
Composing:
To write an entry simply write it on the command line, e.g. "jrnl
yesterday at 1pm: Went to the gym."
Reading:
Specifying either of these parameters will display posts of your journal
-from DATE View entries after this date
-until DATE, -to DATE
View entries before this date
-on DATE View entries on this date
-and Filter by tags using AND (default: OR)
-starred Show only starred entries
-n [N] Shows the last n entries matching the filter. '-n 3'
and '-3' have the same effect.
Export / Import:
Options for transmogrifying your journal
--short Show only titles or line containing the search tags
--tags Returns a list of all tags and number of occurences
--export TYPE Export your journal. TYPE can be json, markdown, or
text.
-o OUTPUT Optionally specifies output file when using --export.
If OUTPUT is a directory, exports each entry into an
individual file instead.
--encrypt [FILENAME] Encrypts your existing journal with a new password
--decrypt [FILENAME] Decrypts your journal and stores it in plain text
--edit Opens your editor to edit the selected entries.
The fix seems to be that your keyrings.alt Python library needs a bump:
pip3 install --upgrade keyrings.alt
This fixed it for me on Ubuntu 18.04. Hope that helps.
Updating keyrings.alt did indeed fix it. Thanks!
@maebert just looping you in. I haven't seen this before, but it's been happening recently. Is there something that can be done with the jrnl pip package to address this?
@napcs By any chance, do you know how to detect the problem and print an helpful message if it happens ?
I didn't have the problem when I developed a module using keyring.
A colleague of mine is testing my module and encountered the problem. And solved it using the fix you suggested: pip3 install --upgrade keyring.alt.
I was thinking of
try:
import keyring
catch ???:
log.error('Python builtin module keyring.alt version doesn\'t match keyring sub module alt version. Upgrade python version using `pip3 install --upgrade keyring.alt`')
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.
Most helpful comment
The fix seems to be that your keyrings.alt Python library needs a bump:
This fixed it for me on Ubuntu 18.04. Hope that helps.