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

UpgradeValidationException when there is no "default" journal #664

Open
anoopd opened this issue Sep 27, 2019 · 8 comments
Open

UpgradeValidationException when there is no "default" journal #664

anoopd opened this issue Sep 27, 2019 · 8 comments
Labels
bug Something isn't working 📌 This can't go stale
Milestone

Comments

@anoopd
Copy link

anoopd commented Sep 27, 2019

I have installed latest jrnl using pip and tried to run it ....... i had two journals work and fitness which the new one asked will be upgraded and i gave a yes but i got

 Upgrading plain text 'default' journal stored in /Users/anoopd/journal.txt...
  Created a backup at /Users/anoopd/journal.txt.backup

Upgrading plain text 'work' journal stored in ~/work.txt...
Created a backup at ~/work.txt.backup

 Upgrading plain text 'fitness' journal stored in ~/fitness.txt...
 Created a backup at ~/fitness.txt.backup

 The following journal failed to upgrade:
 default
  Aborting upgrade.`
@wren wren added bug Something isn't working support End user support labels Sep 27, 2019
@wren
Copy link
Member

wren commented Sep 27, 2019

This sounds to me like you don't have a default journal. Which I hadn't considered before. If you copy one of your other journal to the default journal location (e.g. cp ~/work.txt ~/journal.txt), does that allow the migration to complete? I suspect that should get you unstuck.

If that does work, please report back. It would point to a bug in how we handle journals that exist in the config, but not on the file system.

@anoopd
Copy link
Author

anoopd commented Sep 28, 2019

Sorry to mention , i have already tried that by doing touch ~/work.txt and touch ~/journal.txt even before i posted this issue .

@wren
Copy link
Member

wren commented Sep 30, 2019

@anoopd touch ~/journal.txt is going to give you an empty file for a journal, which will likely have an error. Can you try cp ~/work.txt ~/journal.txt and see if that works? We do still need to fix the bug, but this command might get you going in the meantime.

@rinat715
Copy link

rinat715 commented Sep 30, 2019

I got the same error.
`Following plain text journals will upgraded to jrnl 2.0.0:
default -> /home/archman/Documents/configs/journal.txt
Continue upgrading jrnl? [y/N]
y

Upgrading plain text 'default' journal stored in /home/archman/Documents/configs/journal.txt...
Created a backup at /home/archman/Documents/configs/journal.txt.backup
DEBUG jrnl.Journal opened LegacyJournal with 30 entries
DEBUG jrnl.Journal Imported 30 entries from LegacyJournal to PlainJournal

The following journal failed to upgrade:
default
Aborting upgrade.
Please tell us about this problem at the following URL:
https://github.com/jrnl-org/jrnl/issues/new?title=UpgradeValidationException
Exiting.`

@anoopd
Copy link
Author

anoopd commented Oct 3, 2019

@wren Thank you , i deleted journal.txt and copied the work.txt as journal.txt and it is working now ! Thank you

@anoopd anoopd closed this as completed Oct 3, 2019
@wren
Copy link
Member

wren commented Oct 3, 2019

@anoopd I'm glad that worked for you! We still need to fix this bug to handle it better for other users, so I'm going to leave it open for now.

@wren wren reopened this Oct 3, 2019
@wren wren removed the support End user support label Oct 3, 2019
@pspeter
Copy link
Contributor

pspeter commented Oct 17, 2019

Upgrading fails for me too. After some debugging I noticed that the new Journal class seems to completely ignore the config["dateformat"] and thus parses the old dates wrong. That's why upgrading seems to fail.

My dateformat was %d.%m.%Y %H:%M. 09.05.2019 gets interpreted as 2019-09-05, but it should be 2019-05-09.

I guess this makes this issue related to #630.

@stale
Copy link

stale bot commented Dec 16, 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.

@stale stale bot added the stale Inactive issue: will be closed soon if no activity label Dec 16, 2019
@wren wren added the 📌 This can't go stale label Dec 19, 2019
@stale stale bot removed the stale Inactive issue: will be closed soon if no activity label Dec 19, 2019
@micahellison micahellison changed the title UpgradeValidationException UpgradeValidationException when there is no "default" journal Jun 20, 2020
@micahellison micahellison added this to the Backlog milestone Sep 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working 📌 This can't go stale
Projects
None yet
Development

No branches or pull requests

5 participants