You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is an edge case, but should still be handled gracefully.
$ jrnl
Welcome to jrnl v2.0.1.
It looks like you've been using an older version of jrnl until now. That's
okay - jrnl will now upgrade your configuration and journal files. Afterwards
you can enjoy all of the great new features that come with jrnl 2:
- Support forstoring your journalin multiple files
- Faster reading and writing for large journals
- New encryption back-end that makes installing jrnl much easier
- Tons of bug fixes
Please note that jrnl 1.x is NOT forward compatible with this version of jrnl.
If you choose to proceed, you will not be able to use your journals with
older versions of jrnl anymore.
Following plain text journals will upgraded to jrnl v2.0.1:
default -> /Users/alichtman/journals/journal.txt
tech -> /Users/alichtman/journals/tech.txt
Continue upgrading jrnl? [y/N]
y
Upgrading plain text 'default' journal stored in /Users/alichtman/journals/journal.txt...
Created a backup at /Users/alichtman/journals/journal.txt.backup
Upgrading plain text 'tech' journal stored in /Users/alichtman/journals/tech.txt...
Created a backup at /Users/alichtman/journals/tech.txt.backup
Traceback (most recent call last):
File "/usr/local/bin/jrnl", line 10, in<module>sys.exit(run())
│ └ <function run at 0x107fba5f0>
└ <module 'sys' (built-in)>
File "/usr/local/lib/python3.7/site-packages/jrnl/cli.py", line 148, in run
config = install.load_or_install_jrnl()
└ <module 'jrnl.install' from '/usr/local/lib/python3.7/site-packages/jrnl/install.py'>
File "/usr/local/lib/python3.7/site-packages/jrnl/install.py", line 92, in load_or_install_jrnl
upgrade.upgrade_jrnl_if_necessary(config_path)
│ └ '/Users/alichtman/.jrnl_config'
└ <module 'jrnl.upgrade' from '/usr/local/lib/python3.7/site-packages/jrnl/upgrade.py'>
File "/usr/local/lib/python3.7/site-packages/jrnl/upgrade.py", line 95, in upgrade_jrnl_if_necessary
backup(path)
│ └ '/Users/alichtman/journals/tech.txt'
└ <function backup at 0x107d7bc20>
File "/usr/local/lib/python3.7/site-packages/jrnl/upgrade.py", line 15, in backup
with open(filename, 'rb'if binary else'r') as original:
FileNotFoundError: [Errno 2] No such file or directory: '/Users/alichtman/journals/tech.txt'
The file /Users/alichtman/journals/tech.txt does not exist, but is included in my config.
I'd suggest prompting the user to either fix the config or create the file.
The text was updated successfully, but these errors were encountered:
micahellison
changed the title
jrnl Upgrade Exception on Missing Journal File
jrnl upgrade does not fail gracefully when a journal file is missing from the configuration
Nov 2, 2019
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
stalebot
added
the
stale
Inactive issue: will be closed soon if no activity
label
Jan 1, 2020
This is an edge case, but should still be handled gracefully.
The file
/Users/alichtman/journals/tech.txt
does not exist, but is included in my config.I'd suggest prompting the user to either fix the config or create the file.
The text was updated successfully, but these errors were encountered: