chrisgrieser/shimmering-obsidian

[Bug]: OCR Text into Obsidian Bug

mike4263 opened this issue · 2 comments

Bug Description

I get the following error when attempting to perform the "OCR Text into Obsidian" command:

[10:17:15.232] ERROR: Shimmering Obsidian[[Run Script](alfredpreferences:workflows%3Eworkflow%3Euser.workflow.4F1D1EE0-4503-4ACA-8A7C-E99F0029C5B9%3E23310407-0757-4547-AC30-83A9AF365D9D)] /Users/user/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.4F1D1EE0-4503-4ACA-8A7C-E99F0029C5B9/scripts/absolute-to-relative-path.js: execution error: Error: TypeError: $.getenv is not a function. (In '$.getenv("alfred_workflow_data")', '$.getenv' is undefined) (-2700)

I've already fixed this locally. Will submit an MR soon with the fix.

Relevant Screenshot

No response

To Reproduce

  1. assign a hot key to the "OCR Text into Obsidian" function
  2. It doesnt work

Debugging Log

[10:18:37.461] Shimmering Obsidian[Hotkey] Processing complete
[10:18:37.486] Shimmering Obsidian[Hotkey] Passing output '' to Arg and Vars
[10:18:37.498] Shimmering Obsidian[Arg and Vars] Processing complete
[10:18:37.510] Shimmering Obsidian[Arg and Vars] Passing output '' to Run Script
[10:18:40.375] Shimmering Obsidian[Run Script] Processing complete
[10:18:40.397] Shimmering Obsidian[Run Script] Passing output '/Users/user/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/de.chris-grieser.shimmering-obsidian/temp_ocr_snapshot.png
text - 

Estimating resolution as 120
/Users/user/vault/test/OCR-Screenshots.md' to Post Notification
[10:18:40.415] Shimmering Obsidian[Post Notification] Processing complete
[10:18:40.434] Shimmering Obsidian[Post Notification] Passing output '/Users/user/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/de.chris-grieser.shimmering-obsidian/temp_ocr_snapshot.png
text - 

Estimating resolution as 120
/Users/user/vault/test/OCR-Screenshots.md' to Run Script
[10:18:40.506] ERROR: Shimmering Obsidian[Run Script] /Users/user/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.4F1D1EE0-4503-4ACA-8A7C-E99F0029C5B9/scripts/absolute-to-relative-path.js: execution error: Error: TypeError: $.getenv is not a function. (In '$.getenv("alfred_workflow_data")', '$.getenv' is undefined) (-2700)
[10:18:40.531] Shimmering Obsidian[Run Script] Processing complete
[10:18:40.549] Shimmering Obsidian[Run Script] Passing output '' to Conditional

Workflow Configuration

image

Version & System Information

-------------------------------
INTERNAL WORKFLOW CONFIGURATION
Vault Path: /Users/user/vault/test
.obsidian: exists
Metadata JSONs: 4/4
metadata.json String Length: 12239
-------------------------------
WORKSPACE DATA
'workspace.json' exists
-------------------------------
SYSTEM
macOS: 13.3.1
Alfred: 4.5.1
-------------------------------
INSTALLED VERSION
Obsidian: 1.1.16
This Workflow: 3.9.4
Advanced URI Plugin: 1.35.0
Metadata Extractor: 1.1.0
-------------------------------
LATEST VERSION
Obsidian: 1.1.16 (Insider: 1.2.6)
This Workflow: 3.9.4
Advanced URI Plugin: 1.35.0
Metadata Extractor: 1.1.0
-------------------------------

Last working version

No response

Make sure you have done the following

  • I have updated to the latest version of this workflow.
  • I am using Alfred 5. (Alfred 4 is not supported by this workflow anymore.)
  • I have updated to the latest version of the Metadata-Extractor and the Advanced URI plugin.
  • If the o… main search does not work, I made sure that I haven't changed any of the default settings of the Metadata-Extractor. Furthermore, I have tried rerunning osetup and it still does not work.
  • If notes in general can be found, but recently created or renamed notes cannot, I used the oupdate command to manually update the metadata.
  • I have not renamed my Obsidian config folder, it's still .obsidian (About → Advanced → Override config folder).
  • If I updated to version 3+ for the first time, I have disabled migrating workflow cutomizations. (If you haven't, you can simply re-download and install the latest release from GitHub and uncheck Migrate my workflow customizations.)

where are the PR? I'm facing the same issue

fixed the issue in the latest release