Quiver-alfred
Quiver-alfred copied to clipboard
NameError: global name 'db' is not defined
I've set the library path but when I try to search I'm getting Error NameError: global name 'db' is not defined.
Here is what I get from the debug model.
Starting debug for 'Quiver Search'
[2017-09-22 12:38:36][ERROR: input.scriptfilter] Code 1: 12:38:36 workflow.py:1692 DEBUG Data library_location stored in cpickle format
12:38:36 workflow.py:1707 DEBUG Stored data loaded from : /Users/cogito/Library/Application Support/Alfred 3/Workflow Data/com.cook.quiver/library_location.cpickle
12:38:36 workflow.py:1803 DEBUG Loading cached data from : /Users/cogito/Library/Caches/com.runningwithcrayons.Alfred-3/Workflow Data/com.cook.quiver/__workflow_update_status.cpickle
12:38:36 workflow.py:2379 DEBUG update_data : {u'available': False}
12:38:36 workflow.py:2167 DEBUG Workflow version : 0.4.0
12:38:36 workflow.py:1568 DEBUG Reading settings from ~/Library/Application Support/Alfred 3/Workflow Data/com.cook.quiver/settings.json ...
12:38:36 workflow.py:2451 DEBUG Update check not due
12:38:36 workflow.py:1692 DEBUG Data library_location stored in cpickle format
12:38:36 workflow.py:1707 DEBUG Stored data loaded from : ~/Library/Application Support/Alfred 3/Workflow Data/com.cook.quiver/library_location.cpickle
12:38:36 workflow.py:2185 ERROR global name 'db' is not defined
Traceback (most recent call last):
File "XXX/MEGAsync/Application/Alfred.alfredpreferences/workflows/user.workflow.9A9FF46C-2CBC-499D-A87B-53DCEB90A3CF/workflow/workflow.py", line 2178, in run
func(self)
File "run.py", line 44, in main
db.connect()
NameError: global name 'db' is not defined
12:38:36 workflow.py:2205 DEBUG Workflow finished in 0.018 seconds.
Please help.
Same thing for me.

Same issue for me.
Hey guys - I'm sorry i've been MIA. I believe the PR above fixes this.
Thanks for fast response! Still no luck. quiver.db is just empty.
@keeprock did you clone the repo into your workflows folder?
@danielecook Yes, I did. At first I just edit a line, as PR recommends.
After that, completely replace workflow folder. Check if commits changes was there. And still DB error.
Maybe there is something else is going on, because my Quiver.db file contains only indexes and empty tables.
I've also check if it works at all with newly Quiver DB. It was. But then I connect with my working library - all went out.
Hey @keeprock keeprock - can you add notes to the quiver db? It might need data...I'm not sure I ever tested it with a fresh database...
@danielecook. My bad, Daniel. I guess I expressed myself incorrectly. My Db got notes.
What I was saying is that Workflow works with fresh DB with some notes in it which I created to test if Workflow even work. (DB is not empty). But it is NOT working with my DB (not empty too).
Thanks for your help. It may be that my DB is somehow corrupt or whatever. I'm already debugging code in hope to find where it broken.
It works, thanks!
Has this been fixed? I used the fixum workflow to fix Python libraries that were incompatible with my version of macOS (10.12.6), and that solved that problem but still getting the global name 'db' name is not defined error.
I can confirm it solved the issue for me. That would be great to package a new release. Thx !
Is the workflow accustomed to the nested folder structure introduced in version 3.1 of Quiver? That's what might be throwing mine off.
Same error: workflow.py:2266 ERROR global name 'db' is not defined using Quiver 3.1.1
same here NameError: global name 'db' is not defined 16:48:04 workflow.py:2205
@cyberwu do you have notes in your database?
@danielecook I have notes in my database and I'm having the same issue. I had a nested notebook but I removed it. Happy to provide any other helpful information.
I'm also having this issue -- could it be due to the fact that my Quiver Library is stored in my "Dropbox (Personal)" folder, instead of merely Dropbox?
Can it automatically adjust to nested notebooks? I believe that's the main issue.
Same issue here
Starting debug for 'Quiver Search'
[2018-02-15 15:41:33][ERROR: input.scriptfilter] Code 1: 15:41:32 workflow.py:1692 DEBUG Data `library_location` stored in `cpickle` format
15:41:32 workflow.py:1707 DEBUG Stored data loaded from : /Users/jklein/Library/Application Support/Alfred 3/Workflow Data/com.cook.quiver/library_location.cpickle
15:41:33 workflow.py:1803 DEBUG Loading cached data from : /Users/jklein/Library/Caches/com.runningwithcrayons.Alfred-3/Workflow Data/com.cook.quiver/__workflow_update_status.cpickle
15:41:33 workflow.py:2379 DEBUG update_data : {u'available': False}
15:41:33 workflow.py:2167 DEBUG Workflow version : 0.4.0
15:41:33 workflow.py:1568 DEBUG Reading settings from `/Users/jklein/Library/Application Support/Alfred 3/Workflow Data/com.cook.quiver/settings.json` ...
15:41:33 workflow.py:2451 DEBUG Update check not due
15:41:33 workflow.py:1692 DEBUG Data `library_location` stored in `cpickle` format
15:41:33 workflow.py:1707 DEBUG Stored data loaded from : /Users/jklein/Library/Application Support/Alfred 3/Workflow Data/com.cook.quiver/library_location.cpickle
15:41:33 workflow.py:2185 ERROR global name 'db' is not defined
Traceback (most recent call last):
File "/Users/jklein/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows/user.workflow.7849748C-0D50-444B-AAD0-B8E60BB82B12/workflow/workflow.py", line 2178, in run
func(self)
File "run.py", line 44, in main
db.connect()
NameError: global name 'db' is not defined
15:41:33 workflow.py:2205 DEBUG Workflow finished in 0.063 seconds.
[2018-02-15 15:41:35][ERROR: input.scriptfilter] Code 1: 15:41:34 workflow.py:1692 DEBUG Data `library_location` stored in `cpickle` format
15:41:34 workflow.py:1707 DEBUG Stored data loaded from : /Users/jklein/Library/Application Support/Alfred 3/Workflow Data/com.cook.quiver/library_location.cpickle
15:41:34 workflow.py:1803 DEBUG Loading cached data from : /Users/jklein/Library/Caches/com.runningwithcrayons.Alfred-3/Workflow Data/com.cook.quiver/__workflow_update_status.cpickle
15:41:34 workflow.py:2379 DEBUG update_data : {u'available': False}
15:41:35 workflow.py:2167 DEBUG Workflow version : 0.4.0
15:41:35 workflow.py:1568 DEBUG Reading settings from `/Users/jklein/Library/Application Support/Alfred 3/Workflow Data/com.cook.quiver/settings.json` ...
15:41:35 workflow.py:2451 DEBUG Update check not due
15:41:35 workflow.py:1692 DEBUG Data `library_location` stored in `cpickle` format
15:41:35 workflow.py:1707 DEBUG Stored data loaded from : /Users/jklein/Library/Application Support/Alfred 3/Workflow Data/com.cook.quiver/library_location.cpickle
15:41:35 workflow.py:2185 ERROR global name 'db' is not defined
Traceback (most recent call last):
File "/Users/jklein/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows/user.workflow.7849748C-0D50-444B-AAD0-B8E60BB82B12/workflow/workflow.py", line 2178, in run
func(self)
File "run.py", line 44, in main
db.connect()
NameError: global name 'db' is not defined
15:41:35 workflow.py:2205 DEBUG Workflow finished in 0.090 seconds.
Anyone found a way to use nested notebooks with this workflow? Id really like to get this working
Been using this as of now: https://github.com/noelcody/quiver-fastsearch-alfred seems this issue has been open for awhile so not sure if this is still being maintained. Some more Quiver Alfred workflows: https://github.com/HappenApps/Quiver/wiki/Extensions
@AlexanderKvamme @austinjreilly I do not have a tremendous amount of time to maintain this but I will add it to my to do list. I've removed a try statement that prevented the db from being imported (or throwing an error when imported)... so that should shed some light on what is going on there.
@AlexanderKvamme Is the main issue browsing nested folders?
Also @austinjreilly the workflow you mention is useful but does not offer the ability to browse tags and folders and in fact this workflow provides the same functionality.
@danielecook I cant say for sure. I was trying to make it work for a while, but ended up succeeding with another workflow (https://github.com/noelcody/quiver-fastsearch-alfred), so I just stuck with that!
Happy to help debug but im new to development so might need some help :)