ryanjamurphy / review-obsidian

Add the current note to a future daily note to remember to review it.
139 stars 8 forks source link

Unable to create new file #29

Open onurgu opened 2 years ago

onurgu commented 2 years ago

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 commented 2 years ago

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

ryanjamurphy commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

Thank you! I love this plugin!

cashkeith commented 2 years ago

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 commented 2 years ago

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

cashkeith commented 2 years ago

Ryan,

Here is a capture from the console and of what I show in settings. I don’t have the option to set the location for my daily notes, however it does create a new one properly just errors if the note already exists.  -ck

On Nov 21, 2021, 10:07 AM -0600, ryanjamurphy @.***>, wrote:

@cashkeith Shoot. Does your console show the same error pictured above, in the original post in this thread? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. image image

shaderein commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

@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 commented 2 years ago

Ha, great, glad it's fixed!

etiennepellegrini commented 2 years ago

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 commented 9 months ago

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 commented 2 months ago

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 commented 2 weeks ago

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.