Under OS X, Emacs 24.3, using Anaconda python2.7, when I press C-c C-c to execute my python code, I get the following error:
Debugger entered--Lisp error: (void-variable proc)
(process-name proc)
(string-match "ipython" (process-name proc))
(if (string-match "ipython" (process-name proc)) (progn (sit-for py-ipython-execute-delay)))
(progn (if (string-match "ipython" (process-name proc)) (progn (sit-for py-ipython-execute-delay))) (setq erg (py-execute-file-base nil file)) (sit-for 0.2) (if (string-match (concat py-pdbtrack-input-prompt "\\|" py-pydbtrack-input-prompt) erg) (set-buffer procbuf) (setq err-p (py-postprocess-output-buffer procbuf py-exception-buffer)) (if err-p (progn (setnth 1 err-p (1- (nth 1 err-p))) (py-jump-to-exception err-p py-exception-buffer)) (py-shell-manage-windows py-buffer-name)) (if (string= (buffer-name (current-buffer)) (buffer-name procbuf)) nil (if py-verbose-p (progn (message "Output buffer: %s" procbuf))))))
(if (file-readable-p file) (progn (if (string-match "ipython" (process-name proc)) (progn (sit-for py-ipython-execute-delay))) (setq erg (py-execute-file-base nil file)) (sit-for 0.2) (if (string-match (concat py-pdbtrack-input-prompt "\\|" py-pydbtrack-input-prompt) erg) (set-buffer procbuf) (setq err-p (py-postprocess-output-buffer procbuf py-exception-buffer)) (if err-p (progn (setnth 1 err-p (1- (nth 1 err-p))) (py-jump-to-exception err-p py-exception-buffer)) (py-shell-manage-windows py-buffer-name)) (if (string= (buffer-name (current-buffer)) (buffer-name procbuf)) nil (if py-verbose-p (progn (message "Output buffer: %s" procbuf)))))) (message "%s not readable. %s" file "Do you have permissions?"))
py-execute-buffer-file(nil "/Users/stanton/projects/test/python/amput.py")
(cond (python-mode-v5-behavior-p (py-execute-python-mode-v5 start end)) (py-execute-no-temp-p (py-execute-ge24\.3 start end py-dedicated-process-p file)) ((and (not (buffer-modified-p)) file) (py-execute-buffer-file py-dedicated-process-p file)) (t (py-execute-buffer-finally start end py-dedicated-process-p)))
(let* ((windows-config (window-configuration-to-register 313465889)) (windows-displayed (window-list-1)) (py-shell-name (or py-shell-name (py-choose-shell))) (py-exception-buffer (current-buffer)) (execute-directory (cond ((condition-case nil (progn (file-name-directory ...)) (error nil))) ((and py-use-current-dir-when-execute-p (buffer-file-name)) (file-name-directory (buffer-file-name))) ((and py-use-current-dir-when-execute-p py-fileless-buffer-use-default-directory-p) (expand-file-name default-directory)) ((stringp py-execute-directory) py-execute-directory) ((getenv "VIRTUAL_ENV")) (t (getenv "HOME")))) (py-buffer-name (or py-buffer-name (py-buffer-name-prepare))) (py-orig-buffer-or-file (current-buffer))) (cond (python-mode-v5-behavior-p (py-execute-python-mode-v5 start end)) (py-execute-no-temp-p (py-execute-ge24\.3 start end py-dedicated-process-p file)) ((and (not (buffer-modified-p)) file) (py-execute-buffer-file py-dedicated-process-p file)) (t (py-execute-buffer-finally start end py-dedicated-process-p))))
py-execute-base(1 1415 nil "/Users/stanton/projects/test/python/amput.py")
(let ((py-shell-name (cond ((or py-force-local-shell-p py-force-py-shell-name-p) py-shell-name) ((or py-force-py-shell-name-p (eq 4 (prefix-numeric-value shell))) (default-value (quote py-shell-name))) ((and (numberp shell) (not (eq 1 ...))) (read-from-minibuffer "(path-to-)shell-name: " (default-value (quote py-shell-name)))) (t shell)))) (py-execute-base start end py-dedicated-process-p file))
py-execute-region(1 1415 nil nil "/Users/stanton/projects/test/python/amput.py")
(let* ((wholebuf t) (py-master-file (or py-master-file (py-fetch-py-master-file))) (file (or file (if py-master-file (prog1 (expand-file-name py-master-file) (set-buffer (or ... ...)))) (buffer-file-name))) (beg (point-min)) (end (point-max))) (py-execute-region beg end shell py-dedicated-process-p file))
py-execute-buffer(nil)
call-interactively(py-execute-buffer nil nil)
Hi Richard,
thanks for the report. Could not reproduce. Several things changed meanwhile. If you get the error still with trunk of today, please send some example code.
Andreas