Acidham / chromium-hist-bookmarks

Search in Chromium History and Bookmarks
137 stars 18 forks source link

Issue with pyenv #25

Closed SoryEscobar closed 1 year ago

SoryEscobar commented 2 years ago

Hi, I have pyenv installed so I think is not picking the right python interpreter because the script is not working. Do you know how can fix the workflow for my particular configuration?

Acidham commented 2 years ago

What python version is the workflow using? Please take a look into Workflow Debugger?

I am also using pyenv and set global to python 3.9

What is defined in py3 under ~/Library/Application Support/Alfred/Workflow Data/com.apple.alfred.workflow.chromium-hist

SoryEscobar commented 2 years ago
image image
SoryEscobar commented 2 years ago
image
SoryEscobar commented 2 years ago
image
Acidham commented 2 years ago

Looks good, the wf uses python 3.8.2 and found history file for Brave. Did you try to search with other search terms?

SoryEscobar commented 2 years ago

Yes, it doesn't find anything for any given search term

Acidham commented 2 years ago

Are there any other errors in the debug output?

And can you enable Safari, visit some pages and try again?

SoryEscobar commented 2 years ago

I see no errors, just no output:

image

Im wondering if the error is because of this:

image

It looks like it is trying to query some db/file that doesn't exist or has no data, hence no results.

Acidham commented 2 years ago

Yes py3 is the file where the script stores the newest python version.

You could remove py3 from the workflow steps with python3

Acidham commented 2 years ago

found this https://www.dev2qa.com/how-to-fix-read-only-file-system-error-when-run-mkdir-command-on-macos/

SoryEscobar commented 2 years ago

Question, what gets stored on this variable? this is py3.sh btw

image

Im trying to replicate manually over the console

Acidham commented 2 years ago

py3 just stores the path to python3

SoryEscobar commented 2 years ago

I see, what would I need to skip the py3.sh and execute directly? Like this:

image
Acidham commented 2 years ago

that does not work because you all settings added as env variables. you could debug it in vscode with an .env file. i can provide that to you tomorrow if you wish to debug.

another thing came to my mind: does Alfred have full disk access in system preferences ?

https://www.alfredapp.com/help/getting-started/permissions/

for me it looks like permission problem and other workflows where data dir and cache dir is required would also not work. both directories have to be created on runtime by Alfred/ wf code.

SoryEscobar commented 2 years ago

I just validated and indeed Alfred has full access disk permission granted. Yeah if you could provide that .env file would be great thanks!

Acidham commented 2 years ago

Did you try to remove the py3.sh from the Alfred workflow. E.g., bh step you need ./py3.sh chrom_history.py "$1"python3 chrom_history.py "$1"

Following the .env file content in case you want to debug:

edge=0
brave=1
brave_beta=0
chromium=0
chrome=0
opera=0
sidekick=0
vivaldi=0
safari=0
ignored_domains=mail.google.com,mail.gmx.com
show_favicon=1
sort_recent=1
date_format=%d.%m.%Y
alfred_workflow_cache=<add_absolute_path_to_alfred_cache_dir>
url=https://www.thingiverse.com