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

Unable to create new file #29

Open
onurgu opened this issue Nov 1, 2021 · 15 comments
Open

Unable to create new file #29

onurgu opened this issue Nov 1, 2021 · 15 comments

Comments

@onurgu
Copy link

onurgu commented Nov 1, 2021

Trying to add a review to a daily note which was created beforehand pops up a notification that says 'Unable to create new file'.

The following is the console log.

image

Apparently the function does not check whether the daily note is already created or not.

@tofujlg
Copy link

tofujlg commented Nov 3, 2021

I have the exactly same issue with the same console log.

@ryanjamurphy
Copy link
Owner

I can reproduce this. Weird, I swear it used to work. Maybe something changed with the API...

I will investigate and fix this. Thanks for the report!

@ryanjamurphy
Copy link
Owner

Pretty sure I've fixed this in 1.6.4. Apologies for the trouble.

(It was a dumb mistake. I removed a user-configurable setting for Daily Notes in a recent release but didn't update the code that was using that setting to find your daily notes folder. Sigh.)

@tofujlg
Copy link

tofujlg commented Nov 6, 2021

Thank you!
I love this plugin!

@cashkeith
Copy link

I just installed the plug-in this morning (from within Obsidian, not manually). It shows to be version 1.6.4, but I am having these same issues. 1.) settings doesn't have a section to set the daily notes folder. 2.) getting the error of unable to create a new file when attempting to add to a daily note that already exits.

@ryanjamurphy
Copy link
Owner

@cashkeith Shoot. Does your console show the same error pictured above, in the original post in this thread?

@cashkeith
Copy link

cashkeith commented Nov 23, 2021 via email

@shaderein
Copy link

2.) getting the error of unable to create a new file when attempting to add to a daily note that already exits.

This issue still exists on my Mac with the same console log, but it works fine on iOS...

@ryanjamurphy
Copy link
Owner

FYI, the old Readme included an erroneous instruction to configure the location of the daily notes folder. That's no longer in the Readme, because it is no longer necessary. This plugin taps directly into the Daily Notes plugin/Periodic Notes plugin.

@shaderein Curious, I can't reproduce it. What's the path for your daily notes, and what's your daily note title format?

@shaderein
Copy link

@ryanjamurphy Thanks for reminding me about the title format! Just found out that it's due to the different date formats I used in daily notes title (YYYY-MM-DD-ddd) and in the natural language plugin (YYYY-MM-DD). Making them consistent solves this issue.

Didn't notice that before since the future notes created using this review plugin also have the day suffix. (So dumb of me...

@ryanjamurphy
Copy link
Owner

Ha, great, glad it's fixed!

@etiennepellegrini
Copy link

etiennepellegrini commented Mar 10, 2022

I came here for the same issue. Could I suggest either:

  1. Stressing that the daily note filename will be inferred from the Natural Language plugin settings (maybe a "troubleshooting" or "common issues" section in the README, or in the settings of Review)
  2. Adding the possibility of overwriting the natural language format in Review

I believe 2 would be a better solution, as it would allow users to have a different format for the date vs. for the daily note filename.

@jmatsushita
Copy link

jmatsushita commented Dec 3, 2023

Hi there,

Thanks for the great plugin. I use this format in my daily notes: YYYY-MM-DD/[LOG] (which creates a date folder with a LOG.md file in it like 2023-12-04/LOG.md. This seems to trouble the review-obsidian plugin and I also get the Unable to create new file error in the UI.

I see the following in the dev console:

plugin:review-obsidian:402 Failed to create file: '2023-12-04/LOG.md' Error: File already exists.
    at t.<anonymous> (app.js:1:705295)
    at app.js:1:237027
    at Object.next (app.js:1:237132)
    at a (app.js:1:235850)
createDailyNote @ plugin:review-obsidian:402
app.js:1 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'path')
    at t.<anonymous> (app.js:1:706389)
    at app.js:1:237027
    at Object.next (app.js:1:237132)
    at app.js:1:236048
    at new Promise (<anonymous>)
    at v (app.js:1:235793)
    at t.read (app.js:1:706270)
    at Review.eval (plugin:review-obsidian:1038:64)
    at step (plugin:review-obsidian:77:23)
    at Object.eval [as next] (plugin:review-obsidian:58:53)
    at fulfilled (plugin:review-obsidian:48:58)

UPDATE: forgot to mention that it does work the first time (or after deleting the future date's note).

@kam-hak
Copy link

kam-hak commented Jun 19, 2024

A small update to fixing this in case helpful. If your daily note has a folder structure (e.g. YYYY/MM-MMMM/DD-dddd), the NLP dates app should only be set to the final part (DD-dddd) to work properly.

@codey-badger
Copy link

A small update to fixing this in case helpful. If your daily note has a folder structure (e.g. YYYY/MM-MMMM/DD-dddd), the NLP dates app should only be set to the final part (DD-dddd) to work properly.

That was it then, thanks!

Although that leaves the nldates parser ineffective, as the path won't match, neither the alias I was using.

Well at least the note will be recognized by the calendar plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants