fgallina / python-django.el

An Emacs package for managing Django projects.
GNU General Public License v3.0
67 stars 24 forks source link

"Run management command" fails #16

Closed gerdint closed 9 years ago

gerdint commented 9 years ago

The 'm' command in the project buffer fails with the following trace (in this for my custom command "testjs":

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  expand-file-name(nil)
  (list (expand-file-name python-django-project-root) (expand-file-name "../" python-django-project-root))
  (mapconcat (quote identity) (list (expand-file-name python-django-project-root) (expand-file-name "../" python-django-project-root)) path-separator)
  (let* ((process-environment (python-shell-calculate-process-environment)) (pythonpath (getenv "PYTHONPATH")) (project-pythonpath (mapconcat (quote identity) (list (expand-file-name python-django-project-root) (expand-file-name "../" python-django-project-root)) path-separator))) (setenv "PYTHONPATH" (if (not pythonpath) project-pythonpath (format "%s%s%s" pythonpath path-separator project-pythonpath))) (setenv "DJANGO_SETTINGS_MODULE" python-django-project-settings) process-environment)
  python-django-info-calculate-process-environment()
  python-django--help-get("testjs")
  python-django-help("testjs")
  python-django-mgmt-list-command-args("testjs")
  #[nil "\305\306\"\210\307    !\210\310\n!\311\304!\210\312\211\207" [setup-hook current-buffer command minibuffer-completion-table hippie-expand-try-functions-list remove-hook minibuffer-setup-hook python-util-clone-local-variables python-django-mgmt-list-command-args make-local-variable (python-django-minibuffer-try-complete-args python-django-minibuffer-try-complete-filenames)] 3]()
  read-from-minibuffer("./manage.py testjs (args): " nil (keymap (remap keymap (scroll-other-window-down . python-django-minibuffer-scroll-help-window-down) (scroll-other-window . python-django-minibuffer-scroll-help-window)) (9 . hippie-expand) keymap (menu-bar keymap (minibuf "Minibuf" keymap (previous menu-item "Previous History Item" previous-history-element :help "Put previous minibuffer history element in the minibuffer") (next menu-item "Next History Item" next-history-element :help "Put next minibuffer history element in the minibuffer") (isearch-backward menu-item "Isearch History Backward" isearch-backward :help "Incrementally search minibuffer history backward") (isearch-forward menu-item "Isearch History Forward" isearch-forward :help "Incrementally search minibuffer history forward") (return menu-item "Enter" exit-minibuffer :key-sequence "
" :help "Terminate input and exit minibuffer") (quit menu-item "Quit" abort-recursive-edit :help "Abort input and exit minibuffer") "Minibuf")) (10 . exit-minibuffer) (13 . exit-minibuffer) (7 . abort-recursive-edit) (C-tab . file-cache-minibuffer-complete) (9 . self-insert-command) (XF86Back . previous-history-element) (up . previous-history-element) (prior . previous-history-element) (XF86Forward . next-history-element) (down . next-history-element) (next . next-history-element) (27 keymap (114 . previous-matching-history-element) (115 . next-matching-history-element) (112 . previous-history-element) (110 . next-history-element))))
  python-django-minibuffer-read-command-args("testjs")
  (list (setq command (python-django-minibuffer-read-command t)) (python-django-minibuffer-read-command-args command))
  call-interactively(python-django-mgmt-run-command nil nil)

Looks like python-django-project-root is nil for some reason, even though it looks fine when I evaluate it's value in the project buffer.

It may be that this started happening after upgrading to Emacs 24.4. I am using latest python-django from Marmelade (version 20140614.2014).

fgallina commented 9 years ago

Is this still happening to you? so far I wasn't able to replicate.

gerdint commented 9 years ago

Sorry but I'm unable to verify this. I have moved on to other things since filing that issue.

-Tobias

Den 2015年05月14日 12:34, Fabián Ezequiel Gallina skrev:

Is this still happening to you? so far I wasn't able to replicate.

— Reply to this email directly or view it on GitHub https://github.com/fgallina/python-django.el/issues/16#issuecomment-101898816.

fgallina commented 9 years ago

Ack, closing then.

Thanks.