Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lisp error: (wrong-type-argument char-or-string-p nil) #11

Open
sakagsakag opened this issue Dec 17, 2021 · 5 comments
Open

Lisp error: (wrong-type-argument char-or-string-p nil) #11

sakagsakag opened this issue Dec 17, 2021 · 5 comments

Comments

@sakagsakag
Copy link

hi, im using This is GNU Emacs 26.1 (build 2, arm-unknown-linux-gnueabihf, GTK+ Version 3.24.5)
of 2021-02-07, modified by Debian.

Debugger entered--Lisp error: (wrong-type-argument char-or-string-p nil)
json-read-from-string(nil)
(let* ((json-array-type 'list) (json-object-type 'hash-table) (json-false nil)) (json-read-from-string (anki-core-query anki-core-query-models)))
(let ((models (let* ((json-array-type 'list) (json-object-type 'hash-table) (json-false nil)) (json-read-from-string (anki-core-query anki-core-query-models))))) (setq anki-core-models-hash-table models) models)
anki-core-parse-models()
(let* ((query-result (anki-core-query anki-core-query-cards)) (lines (if query-result (split-string query-result anki-core-sql-newline)))) (anki-core-parse-models) (anki-core-parse-decks) (cond ((equal "" query-result) '("")) (t (let* ((--cl-var-- lines) (line nil) (--cl-var-- nil)) (while (consp --cl-var--) (setq line (car --cl-var--)) (if (not (equal line "")) (progn (setq --cl-var-- (cons (anki-core-parse-card-to-hash-table line) --cl-var--)))) (setq --cl-var-- (cdr --cl-var--))) (nreverse --cl-var--)))))
anki-core-parse-cards()
(let* ((--cl-var-- (anki-core-parse-cards)) (card nil)) (while (consp --cl-var--) (setq card (car --cl-var--)) (if (hash-table-p card) (progn (let ((id (gethash 'id card))) (puthash 'card-format (anki-core-format-card-hash-table card) card) (setq anki-core-database-index (cons id anki-core-database-index)) (puthash id card cards)))) (setq --cl-var-- (cdr --cl-var--))) nil)
(let ((cards (make-hash-table :test 'equal))) (let* ((--cl-var-- (anki-core-parse-cards)) (card nil)) (while (consp --cl-var--) (setq card (car --cl-var--)) (if (hash-table-p card) (progn (let ((id (gethash 'id card))) (puthash 'card-format (anki-core-format-card-hash-table card) card) (setq anki-core-database-index (cons id anki-core-database-index)) (puthash id card cards)))) (setq --cl-var-- (cdr --cl-var--))) nil) (setq anki-core-hash-table cards) cards)
anki-core-cards()
(hash-table-values (anki-core-cards))
anki-core-cards-list()
(setq anki-search-entries (anki-core-cards-list))
(progn (setq anki-search-entries (anki-core-cards-list)) (setq anki-full-entries anki-search-entries))
(if anki-search-entries anki-search-entries (progn (setq anki-search-entries (anki-core-cards-list)) (setq anki-full-entries anki-search-entries)))
anki()
funcall-interactively(anki)
call-interactively(anki record nil)
command-execute(anki record)
execute-extended-command(nil "anki" "anki")
funcall-interactively(execute-extended-command nil "anki" "anki")
call-interactively(execute-extended-command nil nil)
command-execute(execute-extended-command)

@chenyanming
Copy link
Owner

Did you try #2

@sakagsakag
Copy link
Author

using collection.anki2.zip,
but below...

thanks in advance

Debugger entered--Lisp error: (json-readtable-error 2)
signal(json-readtable-error (2))
json-read()
json-read-from-string("\002")
(let* ((json-array-type 'list) (json-object-type 'hash-table) (json-false nil)) (json-read-from-string (anki-core-query anki-core-query-models)))
(let ((models (let* ((json-array-type 'list) (json-object-type 'hash-table) (json-false nil)) (json-read-from-string (anki-core-query anki-core-query-models))))) (setq anki-core-models-hash-table models) models)
anki-core-parse-models()
(let* ((query-result (anki-core-query anki-core-query-cards)) (lines (if query-result (split-string query-result anki-core-sql-newline)))) (anki-core-parse-models) (anki-core-parse-decks) (cond ((equal "" query-result) '("")) (t (let* ((--cl-var-- lines) (line nil) (--cl-var-- nil)) (while (consp --cl-var--) (setq line (car --cl-var--)) (if (not (equal line "")) (progn (setq --cl-var-- (cons (anki-core-parse-card-to-hash-table line) --cl-var--)))) (setq --cl-var-- (cdr --cl-var--))) (nreverse --cl-var--)))))
anki-core-parse-cards()
(let* ((--cl-var-- (anki-core-parse-cards)) (card nil)) (while (consp --cl-var--) (setq card (car --cl-var--)) (if (hash-table-p card) (progn (let ((id (gethash 'id card))) (puthash 'card-format (anki-core-format-card-hash-table card) card) (setq anki-core-database-index (cons id anki-core-database-index)) (puthash id card cards)))) (setq --cl-var-- (cdr --cl-var--))) nil)
(let ((cards (make-hash-table :test 'equal))) (let* ((--cl-var-- (anki-core-parse-cards)) (card nil)) (while (consp --cl-var--) (setq card (car --cl-var--)) (if (hash-table-p card) (progn (let ((id (gethash 'id card))) (puthash 'card-format (anki-core-format-card-hash-table card) card) (setq anki-core-database-index (cons id anki-core-database-index)) (puthash id card cards)))) (setq --cl-var-- (cdr --cl-var--))) nil) (setq anki-core-hash-table cards) cards)
anki-core-cards()
(hash-table-values (anki-core-cards))
anki-core-cards-list()
(setq anki-search-entries (anki-core-cards-list))
(progn (setq anki-search-entries (anki-core-cards-list)) (setq anki-full-entries anki-search-entries))
(if anki-search-entries anki-search-entries (progn (setq anki-search-entries (anki-core-cards-list)) (setq anki-full-entries anki-search-entries)))
anki()
funcall-interactively(anki)
call-interactively(anki record nil)

@chenyanming
Copy link
Owner

collection.anki2.zip would not work, please unzip it.

@chenyanming
Copy link
Owner

chenyanming commented Dec 17, 2021

It supposes a folder

@sakagsakag
Copy link
Author

hi again
thanx for your support.

i got it.
download some .apkg file from https://ankiweb.net/shared/decks/
and unzip and put all files on anki-collection-dir.

and anki.el work!!

nice effort,"kureyon-shin-chan"!!
thanx again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants