Acidham / chromium-hist-bookmarks

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

cant search for bookmarks #4

Closed edheltzel closed 4 years ago

edheltzel commented 4 years ago

I don't know much about python but this is the error

[13:40:44.108] Chromium&Firefox Bookmarks and History[Script Filter] Queuing argument 'at'
[13:40:44.322] Chromium&Firefox Bookmarks and History[Script Filter] Script with argv 'at' finished
[13:40:44.327] ERROR: Chromium&Firefox Bookmarks and History[Script Filter] Code 1: Traceback (most recent call last):
  File "/Users/ed/RDM Dropbox/Ed Heltzel/Apps/Alfred/Alfred.alfredpreferences/workflows/user.workflow.64F2AFCD-F4A6-4CA1-A049-C873E532B150/chrom_bookmarks.py", line 182, in <module>
    matches = match(query, fire_bms) if query != str() else fire_bms
  File "/Users/ed/RDM Dropbox/Ed Heltzel/Apps/Alfred/Alfred.alfredpreferences/workflows/user.workflow.64F2AFCD-F4A6-4CA1-A049-C873E532B150/chrom_bookmarks.py", line 164, in match
    t = normalize('NFD', r[0].decode('utf-8'))
AttributeError: 'NoneType' object has no attribute 'decode'
Acidham commented 4 years ago

I just release new version 2 which was under development. Please test and let me know if the issue still exists.

Python 3 is required!

You can check if python 3 is installed by exec python3 -V on terminal

edheltzel commented 4 years ago

I'm on 3.7.7

Acidham commented 4 years ago

Ok good! Does it work now?

edheltzel commented 4 years ago

So I have to update to python 3.8 ?

[13:40:28.916] Logging Started...
[13:45:35.637] Logging Stopped.
[17:10:26.468] Logging Started...
[17:10:48.338] Logging Stopped.
[17:11:02.107] Logging Started...
[17:11:06.018] Chromium&Firefox Bookmarks and History[Script Filter] Queuing argument ''
[17:11:06.093] Chromium&Firefox Bookmarks and History[Script Filter] Script with argv '' finished
[17:11:06.096] ERROR: Chromium&Firefox Bookmarks and History[Script Filter] Code 127: /Users/ed/Library/Caches/com.runningwithcrayons.Alfred/Workflow Scripts/D309D3B4-6E7A-434C-848D-9487ECD351F7:4: command not found: python3.8
Acidham commented 4 years ago

No 3.7.x is fine.

It was my fault, I forgot to change interpreter to default one. Please update to 2.0.1

edheltzel commented 4 years ago

@Acidham Sorry

[17:23:32.452] Logging Started...
[17:23:36.222] Chromium&Firefox Bookmarks and History[Script Filter] Queuing argument ''
[17:23:39.799] Chromium&Firefox Bookmarks and History[Script Filter] Script with argv '' finished
[17:23:39.801] STDERR: Chromium&Firefox Bookmarks and History[Script Filter] PYTHON VERSION: 3.7.3 (default, Apr  7 2020, 14:06:47) 
[Clang 11.0.3 (clang-1103.0.32.59)]
[17:23:39.802] Chromium&Firefox Bookmarks and History[Script Filter] Python version 3.8.0 or higher required!
[17:23:39.803] ERROR: Chromium&Firefox Bookmarks and History[Script Filter] JSON error: JSON text did not start with array or object and option to allow fragments not set. in JSON:
Python version 3.8.0 or higher required!
[17:23:40.864] Chromium&Firefox Bookmarks and History[Script Filter] Queuing argument 'cheat'
[17:23:41.033] Chromium&Firefox Bookmarks and History[Script Filter] Script with argv 'cheat' finished
[17:23:41.036] STDERR: Chromium&Firefox Bookmarks and History[Script Filter] PYTHON VERSION: 3.7.3 (default, Apr  7 2020, 14:06:47) 
[Clang 11.0.3 (clang-1103.0.32.59)]
Acidham commented 4 years ago

You can ignore the message with higher than 3.8.

Are you executing bh or bm ?

Please execute /usr/bin/env python3 -V and let me know what terminal prints out

Acidham commented 4 years ago

found the issue with version. Please update again to 2.0.2

Sorry I released v2 too fast :/

edheltzel commented 4 years ago

cool no worries

Acidham commented 4 years ago

Does it work now?

edheltzel commented 4 years ago

with the bm i can get the initial load of the json but searching returns no results. Screen Capture on 2020-05-06 at 17-44-34

with the bh i get a Searching... Screen Shot 2020-05-06 at 5 43 08 PM

Also having python freak out Screen Shot 2020-05-06 at 5 45 28 PM

Acidham commented 4 years ago

I also figured that out on my machine when history is quite big. In previous version I tried to limit...let me look into it.

You can force quit on both python without any issue

Acidham commented 4 years ago

Please try with again with v 2.0.3

Re bm please open WF debugger, there must be an error.

BTW: Which browsers are installed on your system?

edheltzel commented 4 years ago

Still same issue bm loads JSON and then logs [truncated] after the initial load once i start to type this is what is in the log for the WorkFlow log:


[19:32:29.473] Chromium&Firefox Bookmarks and History[Script Filter] Queuing argument 'jek'
[19:32:29.683] Chromium&Firefox Bookmarks and History[Script Filter] Script with argv 'jek' finished
[19:32:29.692] ERROR: Chromium&Firefox Bookmarks and History[Script Filter] Code 1: PYTHON VERSION: 3.7.3 (default, Apr  7 2020, 14:06:47) 
[Clang 11.0.3 (clang-1103.0.32.59)]
Traceback (most recent call last):
  File "/Users/ed/RDM Dropbox/Ed Heltzel/Apps/Alfred/Alfred.alfredpreferences/workflows/user.workflow.DE57D690-FA30-40E2-85DF-7C7F4F8E128E/chrom_bookmarks.py", line 187, in <module>
    matches = match(query, fire_bms) if query != str() else fire_bms
  File "/Users/ed/RDM Dropbox/Ed Heltzel/Apps/Alfred/Alfred.alfredpreferences/workflows/user.workflow.DE57D690-FA30-40E2-85DF-7C7F4F8E128E/chrom_bookmarks.py", line 165, in match
    t = normalize('NFC', r[0])
TypeError: normalize() argument 2 must be str, not None```
edheltzel commented 4 years ago

I'm using Brave and Firefox - but I have Chrome installed with Safari (mac)

Acidham commented 4 years ago

There must be an empty title of a bookmark in your DB. I cannot reproduce even if I am deleting a title of a Firefox Bookmark I cannot reproduce. However I added some tweaks to. Please try 2.0.4 and let me know.

edheltzel commented 4 years ago

🙌 we got a winner - its searching through my bookmarks and history!

Thanks! 👍

Acidham commented 4 years ago

Awesome thanks...over the past view days I will release a few improvements.

One thing that I am doing sometimes is to delete history to get more accurate data and faster.

edheltzel commented 4 years ago

right on! I dig that your workflow - searches all browsers (for the most part) I switch browsers for different sites and development projects all the time so being able to search everything got me excited.

appreciate the work you did here.!! 💯

Acidham commented 4 years ago

That's why I built it ;)

Also the ability to search with & and |