-
-
Notifications
You must be signed in to change notification settings - Fork 529
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
Can't write first entry in directory journal when directory doesn't exist #1894
Comments
Looks like this is Windows-only, since a related CI test is failing only on Windows. I also couldn't replicate this locally on WSL/Ubuntu.
|
I'm mystified by this bug. I was able to reproduce this locally for a little while. I also reproduced it in the interactive Python 3.12 shell with I searched around for others with issue, but most of the resolutions I see also don't seem to make much sense, and I think they're not actually solving the problem so much as drawing post hoc conclusions. I don't see anyone writing code to fix this problem. Whatever the case, that brief test that reproduced this problem in interactive Python showed that it's a problem with Windows (or Python on Windows), rather than a problem with jrnl. Python on Windows is failing to deliver what the If you're a jrnl user and you have this problem, please let us know here and maybe we can narrow it down some more, but without reports of anyone else running into this, I don't think it's worth the effort to keep investigating. |
I've found the root cause for this and it's expected behaviour (though unintuitive behaviour). From the docs, Jrnl detects that a journal is a
In the A proper fix would be to use The fact that the tests work on Linux is the actual bug. Running
shows that, on Linux, it creates a FileJournal and happily chugs along. |
Diagnostic output
Current Behavior
FileNotFoundError when writing the first entry of a directory journal whose directory does not yet exist. Not sure if this is a Windows-specific bug.
Expected Behavior
jrnl should create any missing directories, whether it's the root directory of the directory journal, or the subdirectories for years and months.
Repro Steps
default: c:\temp\testing\newfolder\
rmdir /s c:\temp\testing\newfolder\
jrnl here is my new entry
Debug output
Other Information
As a user, you can get past this bug by creating the missing directory first, then running jrnl.
Discovered while reviewing #1873. Not sure how long this bug has existed.
The text was updated successfully, but these errors were encountered: