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

Error at start. #116

Open
algon-ns opened this issue Nov 22, 2020 · 9 comments
Open

Error at start. #116

algon-ns opened this issue Nov 22, 2020 · 9 comments

Comments

@algon-ns
Copy link

When I start the org-roam-server with (org-roam-server-mode t), I get this (taceback)

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
file-name-directory(nil)
org-roam-server-mode(t)
eval-buffer(#<buffer load-250872> nil "/Users/niels/.emacs.d/config.el" nil t) ; Reading at buffer position 114506
load-with-code-conversion("/Users/niels/.emacs.d/config.el" "/Users/niels/.emacs.d/config.el" nil nil)
load("/Users/niels/.emacs.d/config.el" nil nil t)
load-file("~/.emacs.d/config.el")
(let ((orgfile (concat my-user-emacs-directory "config.org")) (elfile (concat my-user-emacs-directory "config.el"))) (if (or (not (file-exists-p elfile)) (file-newer-than-file-p orgfile elfile)) (progn (my-tangle-config-org))) (load-file elfile))
eval-buffer(#<buffer load> nil "/Users/niels/.emacs.d/init.el" nil t) ; Reading at buffer position 9226
load-with-code-conversion("/Users/niels/.emacs.d/init.el" "/Users/niels/.emacs.d/init.el" t t)
load("/Users/niels/.emacs.d/init" noerror nomessage)
startup--load-user-init-file(#f(compiled-function () #<bytecode 0xb9b71679d120c40>) #f(compiled-function () #<bytecode 0x81a386fa189e553>) t)
command-line()
normal-top-level()

but everything seems to work OK, at least the web-server runs....

med venlig hilsen (With Kind regards) ... again :-)
Niels Søndergaard

@goktug97
Copy link
Member

There are 2 places where the file-name-directory function is used. Can you disable org-roam-server-export-inline-images and try again. Also what is the output of

(f-full (or
          load-file-name
          buffer-file-name))

@algon-ns
Copy link
Author

algon-ns commented Nov 25, 2020 via email

@goktug97
Copy link
Member

I think the problem is here.

(defvar org-roam-server-root
(concat (file-name-directory
(f-full (or
load-file-name
buffer-file-name)))
"."))

I write this to find the path of the org-roam-server installation so I can start a webserver in there and reference some assets. How did you install org-roam-server?

@algon-ns
Copy link
Author

algon-ns commented Nov 25, 2020 via email

@goktug97
Copy link
Member

Can you check whether it makes any difference if you load org-roam-server-mode manually by removing (org-roam-server-mode t) and using M-x org-roam-server-mode

@algon-ns
Copy link
Author

algon-ns commented Nov 25, 2020 via email

@algon-ns
Copy link
Author

algon-ns commented Nov 25, 2020 via email

@bram85
Copy link

bram85 commented Jan 3, 2021

I've seen the same issue. But it appears to be resolved after installing the latest version from MELPA.

I suspect something weird was going on in the compiled code, as I didn't see the error message when using the interpreted version (C-M-x on org-roam-server-mode). However, the httpd log would still show the type error (and not show any graph in the browser, error 500).

@eecsfuture
Copy link

I have the same issue for a long time. I've tried the method mentioned above but it didn't work, even if I use the latest version of Spacemacs and org-roam-server. My config is Win10, emacs 26.3, latest Spacemacs develop branch (commit Date: Tue Mar 23 18:52:45 2021), and latest org-roam-server package (20210321.1040)

And after I update emacs from 26.3 to 27.1, the problem has gone. I don't know why but it works fine now, maybe you can try it.

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

4 participants