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

ObjectNotFound: (dly.exe:String) [], CommandNotFoundException on PowerShell for Windows 11 #2

Open
thinkh opened this issue Jan 15, 2023 · 4 comments

Comments

@thinkh
Copy link

thinkh commented Jan 15, 2023

Thanks for making this nifty command line tool open source. I would like to test it and integrate into my workflow. Unfortunately, it does not start for me on Windows 11. Could you please take a look?

Steps to reproduce

  1. Download .exe version 1.2 to Downloads directory
  2. Run it once
  3. Edit config file and set the correct path to journal folder
     DailyNotesPath: "C:\Users\UsErNaMe\My Tresors\logseq\journals"
     FilenameFormat: "2006_01_02"
     AddTimestamp: true
     AppendHashtag: from-cli
  4. Open PowerShell navigate to Downloads directory
  5. Run dly.exe test

Observed behavior

PS C:\Users\UsErNaMe\Downloads> dly.exe test
dly.exe : Die Benennung "dly.exe" wurde nicht als Name eines Cmdlet, einer Funktion, einer Skriptdatei oder eines
ausführbaren Programms erkannt. Überprüfen Sie die Schreibweise des Namens, oder ob der Pfad korrekt ist (sofern
enthalten), und wiederholen Sie den Vorgang.
In Zeile:1 Zeichen:1
+ dly.exe test
+ ~~~~~~~
    + CategoryInfo          : ObjectNotFound: (dly.exe:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException


Suggestion [3,General]: Der Befehl dly.exe wurde nicht gefunden. Er ist jedoch am aktuellen Ort vorhanden. Windows PowerShell lädt Befehle nicht standardmäßig vom aktuellen Ort. Wenn Sie diesem Befehl vertrauen, geben Sie stattdessen ".\dly.exe" ein. Weitere Informationen erhalten Sie unter "get-help about_Command_Precedence".

Expected behavior

The text should be appended to the journal file.

@wsw70
Copy link
Owner

wsw70 commented Jan 16, 2023

PS C:\Users\UsErNaMe\Downloads> dly.exe test
dly.exe : Die Benennung "dly.exe" wurde nicht als Name eines Cmdlet, einer Funktion, einer Skriptdatei oder eines
ausführbaren Programms erkannt. `

My German is limited to say the least, but I guess this means that dly.exe was not found.

Can you try

  • PS C:\Users\UsErNaMe\Downloads> ./dly.exe test (note the absolute path for dly.exe when you are in the directory C:\Users\UsErNaMe\Downloads)
  • cd /, then C:\Users\UsErNaMe\Downloads\dly.exe test

Both should work.

@thinkh
Copy link
Author

thinkh commented Jan 20, 2023

Sorry, for the German language strings. No, that doesn't work for me unfortunately.

PS C:\Users\My Username\Downloads> .\dly.exe test
2023-01-20T15:53:05+01:00 FATAL cannot unmarshal config file at C:\Users\My Username\.config\dly\dly.yml: yaml: did not find expected hexdecimal number

Because my username has a space in the middle, I needed to wrap it in quotes, but it also doesn't work:

PS C:\> "C:\Users\My Username\Downloads\dly.exe" test
In Zeile:1 Zeichen:43
+ "C:\Users\My Username\Downloads\dly.exe" test
+                                           ~~~~
Unerwartetes Token "test" in Ausdruck oder Anweisung.
    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : UnexpectedToken

Does your windows profile/username contain spaces?

@wsw70
Copy link
Owner

wsw70 commented Jan 20, 2023

Sorry, for the German language strings. No, that doesn't work for me unfortunately.

PS C:\Users\My Username\Downloads> .\dly.exe test
2023-01-20T15:53:05+01:00 FATAL cannot unmarshal config file at C:\Users\My Username\.config\dly\dly.yml: yaml: did not find expected hexdecimal number

Because my username has a space in the middle, I needed to wrap it in quotes, but it also doesn't work:

PS C:\> "C:\Users\My Username\Downloads\dly.exe" test
In Zeile:1 Zeichen:43
+ "C:\Users\My Username\Downloads\dly.exe" test
+                                           ~~~~
Unerwartetes Token "test" in Ausdruck oder Anweisung.
    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : UnexpectedToken

Does your windows profile/username contain spaces?

Ah, I see. No, my username does not contain spaces and I will look at your problem closely by simulating a path with spaces. I am sure there will be a solution :)

@wsw70
Copy link
Owner

wsw70 commented Jan 20, 2023

I just tried with a path with whitespaces and I cannot reproduce your problem (below are attempts with a full path and a local one, with and without argument). Can you try that format?

PS C:\> & 'D:\aaa\bbb ccc\ddd\dly-windows-amd64.exe'
⤑ test
2023-01-20T20:09:49+01:00 INFO note D:\W\Logseq\journals\2023_01_20.md updated
PS C:\> & 'D:\aaa\bbb ccc\ddd\dly-windows-amd64.exe' test
2023-01-20T20:10:22+01:00 INFO note D:\W\Logseq\journals\2023_01_20.md updated

PS D:\aaa\bbb ccc\ddd> .\dly-windows-amd64.exe
⤑ test
2023-01-20T20:10:59+01:00 INFO note D:\W\Logseq\journals\2023_01_20.md updated
PS D:\aaa\bbb ccc\ddd> .\dly-windows-amd64.exe test
2023-01-20T20:11:03+01:00 INFO note D:\W\Logseq\journals\2023_01_20.md updated

Logseq shows the additions:

image

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

No branches or pull requests

2 participants