dash-docs-el / helm-dash

Browse Dash docsets inside emacs
510 stars 59 forks source link

Error: no such table: ZTOKEN #93

Closed stardiviner closed 8 years ago

stardiviner commented 9 years ago

Current path (pwd) is /home/stardiviner/.emacs.d/init/programming/document/.

----------------
 HEY! This is helm-dash (sqlite) error logging. If you want to disable it, set `helm-dash-enable-debugging` to nil
---------------- 

Error: no such table: ZTOKEN
Error: no such table: ZTOKEN
Error: no such table: ZTOKEN


Error: unable to open database "/home/stardiviner/.emacs.d/init/programming/document/Contents/Resources/docSet.dsidx": unable to open database file

Error: unable to open database "/home/stardiviner/.emacs.d/init/programming/document/Contents/Resources/docSet.dsidx": unable to open database file

Error: unable to open database "/home/stardiviner/.emacs.d/init/programming/document/Contents/Resources/docSet.dsidx": unable to open database file

Error: unable to open database "/home/stardiviner/.emacs.d/init/programming/document/Contents/Resources/docSet.dsidx": unable to open database file

I found some docsets can not query now. here is the error message after I toggle helm-dash-enable-debugging.

The debug info shows helm-dash is opening docset database in a wrong place, my docsets path is ~/.docsets.

Some docsets has this problem, some docsets not. problem docsets: Ruby, Go,

vspinu commented 9 years ago

Any news on this? I managed to run helm-dash a couple of times but now I am permanently getting this error.

vspinu commented 9 years ago

It turned out that I was using "JavaSE7" as a docet name whicle the docset directory was simply "Java".

Creating a PR for a more meaningful error.

stardiviner commented 8 years ago

error still exist.

stardiviner commented 8 years ago

After compare between good docset and broken docset.

The files in HTML docset:

: docSet.dsidx
: docSet.mom
: docSet.toc
: docSet.tokencache
: Documents
: LICENSE
: Nodes.xml
: Tokens.xml

the files in Ruby docset:

: docSet.dsidx
: Documents
: LICENSE

You can see, some files are missing. I guess that's why the docset report error: no such table: ZTOKEN.

stardiviner commented 8 years ago

I also checked sqlite database file docSet.dsidx. execute SQL statement select name, type, path from searchIndex; This is correct.

kidd commented 8 years ago

there are several different types of docsets, so the queries change depending on which type of docset it is. I can't reproduce any of this either with Ruby or Go.

stardiviner commented 8 years ago

I found the reason now: My sqlite config caused this issue: Here is my config:

-- [beautiful views]
-- .mode column
.header on
.headers on
.nullvalue "Null"
.separator "|"
.prompt "sqlite> " "   ...> "
-- .echo off

-- for Emacs packages like "helm-dash".
.mode list
kidd commented 8 years ago

is there a way to invoke sqlite ignoring the .sqliterb file?

stardiviner commented 8 years ago

@kidd what about use sqlite3 -init "" ?

kidd commented 8 years ago

thanks @stardiviner . It's ready to be bundled in #102