Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Oct 24 2022 22:40

    jkitchin on org-db-macro

    add org-db-agenda don't check tramp files hashtag enhancement, TODO keywo… and 2 more (compare)

  • Sep 21 2022 12:17

    jkitchin on master

    fix test unbelieveable this ha… rename test (compare)

  • Sep 21 2022 12:04

    jkitchin on master

    new version for fail-fast I do… (compare)

  • Sep 21 2022 12:00

    jkitchin on master

    install aspell there is an err… (compare)

  • Sep 21 2022 11:54

    jkitchin on master

    add continue-on-error (compare)

  • Sep 21 2022 11:45

    jkitchin on master

    one more path change (compare)

  • Sep 21 2022 11:44

    jkitchin on master

    change init path, add ls for de… (compare)

  • Sep 21 2022 11:42

    jkitchin on master

    add nw and batch the previous … (compare)

  • Sep 21 2022 11:40

    jkitchin on master

    try loading init file (compare)

  • Sep 21 2022 11:38

    jkitchin on master

    this fixes something that has b… adds hashtags to @-links. change require to use-package (compare)

  • Jun 10 2022 16:29

    jkitchin on master

    replace first with cl-first add cl-defstruct (compare)

  • Jun 09 2022 15:47

    jkitchin on master

    comment out elpy I think it ha… I am finally switching to emacs… update some key-bindings with i… and 1 more (compare)

  • May 28 2022 20:45

    jkitchin on master

    make debugging latex a little e… (compare)

  • May 28 2022 16:30

    jkitchin on master

    fix minor error when a lob func… (compare)

  • May 28 2022 15:31

    jkitchin on master

    rm global key binding. See issu… (compare)

  • May 12 2022 00:17

    jkitchin on master

    fix error when it is not found,… (compare)

  • May 07 2022 13:53

    jkitchin on master

    rm line that doesn't belong (compare)

  • May 07 2022 13:50

    jkitchin on master

    replace old badges with new act… (compare)

  • May 07 2022 13:47

    jkitchin on master

    move test to another line it s… (compare)

  • May 07 2022 13:44

    jkitchin on master

    add cask install (compare)

johnrkitchin
@johnrkitchin:matrix.org
[m]
I don't think they return anything, so nil is probably fine. That should make the code cells work though because that is where jupyter-python is defined.
Domingo gomez
@GomezDominus_twitter
Debugger entered--Lisp error: (file-error "Creating directory" "Permission denied" "/Users/gomezd/Repositorio")
  signal(file-error ("Creating directory" "Permission denied" "/Users/gomezd/Repositorio"))
  files--ensure-directory("/Users/gomezd/Repositorio")
  make-directory("/Users/gomezd/Repositorio/Software/nb/example/" t)
  (if (file-directory-p dir) nil (make-directory dir t) (cond ((eq 'git nb-project-type) (let ((default-directory dir)) (shell-command "git init") (shell-command "touch .projectile"))) ((eq 'projectile nb-project-type) (let ((default-directory dir)) (shell-command "touch .projectile"))) (t (error "Unknown kind of project: %s" nb-project-type))))
  (let ((dir (file-name-as-directory (expand-file-name name nb-notebook-directory))) (nb-main-file-name (funcall nb-main-file name))) (if (file-directory-p dir) nil (make-directory dir t) (cond ((eq 'git nb-project-type) (let ((default-directory dir)) (shell-command "git init") (shell-command "touch .projectile"))) ((eq 'projectile nb-project-type) (let ((default-directory dir)) (shell-command "touch .projectile"))) (t (error "Unknown kind of project: %s" nb-project-type)))) (projectile-add-known-project dir) (projectile-save-known-projects) (find-file (expand-file-name nb-main-file-name dir)))
  nb-new("/Users/gomezd/Repositorio/Software/nb/example")
  funcall-interactively(nb-new "/Users/gomezd/Repositorio/Software/nb/example")
  call-interactively(nb-new record nil)
  command-execute(nb-new record)
  counsel-M-x-action("nb-new")
  ivy-call()
  ivy-read("M-x " ("nb-open" "ispell-change-dictionary" "org-cdlatex-mode" "insert-char" "auto-fill-mode" "comment-region" "notmuch" "pdb" "comment-box" "racket-run" "replace-string" "package-install" "crossref-lookup" "sage-shell:run-sage" "uncomment-region" "replace-regexp" "info" "racket-mode" "fundamental-mode" "flycheck-next-error" "org-toggle-checkbox" "academic-phrases-by-section" "org-mode" "customize" "revert-buffer" "yas-load-directory" "yas-describe-tables" "cdlatex-command-help" "lsp" "racket-repl" "jupyter-run-repl" "lsp-install-server" "shell" "c-mode" "eshell" "pylint" "scimax-help" "flycheck-mode" "xref-goto-xref" "flycheck-list-errors" "ox-manuscript-new-ivy" "package-list-packages" "python-shell-send-region" "scimax-toggle-image-advice" "calc" "antlr-mode" "eglot-menu" "run-python" "cdlatex-pbb" "count-words" ...) :predicate counsel--M-x-externs-predicate :require-match t :history counsel-M-x-history :action counsel-M-x-action :keymap (keymap (67108908 . counsel--info-lookup-symbol) (67108910 . counsel-find-symbol)) :initial-input nil :caller counsel-M-x)
  counsel-M-x()
  funcall-interactively(counsel-M-x)
  call-interactively(counsel-M-x nil nil)
  command-execute(counsel-M-x)
Dear all, it start to happen that I try nb-new
and the above error happens
I have permission to create directories, I can do it with dired
but it doesn't work with nb-new
John Kitchin
@jkitchin
Weird. Is this a new, sudden issue? If you try making that directory with elisp does it work?
johnrkitchin
@johnrkitchin:matrix.org
[m]
in case it wasn't clear what I meant, can you run this elisp: (make-directory "/Users/gomezd/Repositorio/Software/nb/example/" t) successfully?
Domingo gomez
@GomezDominus_twitter
Thanks! it throws an error
Now, I see that the problem is that the permissions on that directory were wrongly set.
Sorry for the disturbances
Domingo gomez
@GomezDominus_twitter
But, could I ask you another question?
when I run ox-manuscript-new-ivy there are a lot of manuscript types that I don't use. How I could remove them and where I should do it? in my init.el?
John Kitchin
@jkitchin
I guess you have to delete them. The templates are in scimax/ox-manuscript/ox-manuscript-templates
John Kitchin
@jkitchin
Maybe you can set ox-manuscript-user-template-dir to nil or another directory with you templates in it.
Peter Tittmann
@peteWT

I don't think they return anything, so nil is probably fine. That should make the code cells work though because that is where jupyter-python is defined.

The only difference between the two machines is one is running the M1 chip and the other is Intel. Could this be the problem?

John Kitchin
@jkitchin
Are you sharing elisp files via Dropbox or some other thing like that? Emacs-jupyter relies on compiled libraries that wouldn’t be compatible. I feel like on my M2 I had to manually build the zeromq library in particular.
Peter Tittmann
@peteWT

Are you sharing elisp files via Dropbox or some other thing like that? Emacs-jupyter relies on compiled libraries that wouldn’t be compatible. I feel like on my M2 I had to manually build the zeromq library in particular.

Not syncing over dropbox. Will look into compliling zeromq...

johnrkitchin
@johnrkitchin:matrix.org
[m]
what I recall is I had to go into the elpa/zmq library, and run make maybe.
Peter Tittmann
@peteWT

what I recall is I had to go into the elpa/zmq library, and run make maybe.

OK, recompiled zmq from ~/src/scimax/elpa/zmq-20220510.1820. Updated all packages, pulled latest scimax repo. Also tested that I can run jupyter-lab from the shell. Still getting the same issue. Here is the message log from startup. Maybe the JSON error? A

Package dash-functional is obsolete; use dash 2.18.0 instead
Turning on magit-auto-revert-mode...done
Cannot insert ("H" "Magithub" magithub-dispatch-popup) into magit-dispatch; C-h m not found [2 times]
Loading /Users/pete/src/scimax/user/user.el (source)...done
Can’t guess python-indent-offset, using defaults: 4
File mode specification error: (json-number-format 5)
Package cl is deprecated
org-babel-execute-src-block: No org-babel-execute function for jupyter-python!
John Kitchin
@jkitchin:matrix.org
[m]
that makes me thing you didn't load the scimax-jupyter.el library.
John Kitchin
@jkitchin:matrix.org
[m]
I am pretty sure that is where the jupyter-python is installed. I don't recognize File mode specification error: (json-number-format 5) though. what line causes that in user.el?
Peter Tittmann
@peteWT

that makes me thing you didn't load the scimax-jupyter.el library.

How can I be sure I’ve done that @jkitchin

1 reply
johnrkitchin
@johnrkitchin:matrix.org
[m]
makes it work then that is the issue.
Peter Tittmann
@peteWT

just tried with no luck, still
org-babel-execute-src-block: No org-babel-execute function for jupyter-python!

Also, with no user.el file still getting the json error:
Error retrieving kernelspecs: (json-number-format 5)

johnrkitchin
@johnrkitchin:matrix.org
[m]
do you get any errors when loading scimax-jupyter?
it is weird you get a different result with no user.el file. something in there must be changing something.
does (require 'jupyter) also run with no error?
The error you are seeing is from ob-jupyter in the jupyter package (in org-babel-jupyter-aliases-from-kernelspecs)
johnrkitchin
@johnrkitchin:matrix.org
[m]
If I had to guess it is triggered by a jupyter command. what do you get in a shell from this command jupyter kernelspec list --json
Peter Tittmann
@peteWT

does (require 'jupyter) also run with no error?

Yes, no error on eval

If I had to guess it is triggered by a jupyter command. what do you get in a shell from this command jupyter kernelspec list --json

This:

jupyter kernelspec list --json
0.00s - Debugger warning: It seems that frozen modules are being used, which may
0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off
0.00s - to python to disable frozen modules.
0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.
{
  "kernelspecs": {
    "python3": {
      "resource_dir": "/Users/pete/.pyenv/versions/3.11.1/share/jupyter/kernels/python3",
      "spec": {
        "argv": [
          "python",
          "-m",
          "ipykernel_launcher",
          "-f",
          "{connection_file}"
        ],
        "env": {},
        "display_name": "Python 3 (ipykernel)",
        "language": "python",
        "interrupt_mode": "signal",
        "metadata": {
          "debugger": true
        }
      }
    }
  }
}
johnrkitchin
@johnrkitchin:matrix.org
[m]
Can you run this code block:
#+BEGIN_SRC emacs-lisp
(jupyter-available-kernelspecs)
#+END_SRC
2 replies
hm. I wonder of that extra non-json stuff is the problem.
Peter Tittmann
@peteWT

hm. I wonder of that extra non-json stuff is the problem.

You mean the ‘frozen packages’ thing?

johnrkitchin
@johnrkitchin:matrix.org
[m]
yes, that is what I mean
The code that is failing for you in ob-jupyter is probably
(jupyter-read-plist-from-string
                       (or (jupyter-command "kernelspec" "list" "--json")
                           (error "Can't obtain kernelspecs from jupyter shell command")))
Peter Tittmann
@peteWT
do you think this is relevant?
johnrkitchin
@johnrkitchin:matrix.org
[m]
could be. I don't think you can start jupyter in emacs-jupyter like that though. you might want to post a message at the emacs-jupyter repo to see if anyone else is seeing it.
Peter Tittmann
@peteWT

could be. I don't think you can start jupyter in emacs-jupyter like that though. you might want to post a message at the emacs-jupyter repo to see if anyone else is seeing it.

Do you have any thoughts as to how I might resolve it?

johnrkitchin
@johnrkitchin:matrix.org
[m]
downgrade python/jupter. it looks like a 3.11 problem maybe.
Peter Tittmann
@peteWT

downgrade python/jupter. it looks like a 3.11 problem maybe.

Guido weighing in

johnrkitchin
@johnrkitchin:matrix.org
[m]
maybe if you can customize how jupyter is called you could use the solution at the link above, but at the moment it looks like jupyter is hard coded in emacs-jupyter.
Peter Tittmann
@peteWT
I hope you dont mind me having added you to the emacs-jupyter gitter. not a lot of action there recently.
johnrkitchin
@johnrkitchin:matrix.org
[m]
to find out you should post it here: https://github.com/nnicandro/emacs-jupyter/issues
Peter Tittmann
@peteWT

downgrade python/jupter. it looks like a 3.11 problem maybe.

Which python are you using?

johnrkitchin
@johnrkitchin:matrix.org
[m]
3.8
it is a jupyter bug that it outputs noncompliant json though, IMO
Peter Tittmann
@peteWT

3.8

3.9.16 works swimmingly. Thanks for the help @jkitchin !

John Kitchin
@jkitchin:matrix.org
[m]
That is what I use at work too.