chrisgrieser / shimmering-obsidian

Alfred Workflow with dozens of features for controlling your Obsidian vault.
https://alfred.app/workflows/chrisgrieser/shimmering-obsidian/
MIT License
817 stars 40 forks source link

[Bug]: OCR Text into Obsidian Bug #129

Closed mike4263 closed 1 year ago

mike4263 commented 1 year ago

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

crazyxhz commented 1 year ago

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

chrisgrieser commented 1 year ago

fixed the issue in the latest release