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

python-pyflakes must be a string: flycheck-pyflakes-executable #8583

Closed
sebhahn opened this issue Mar 26, 2017 · 9 comments
Closed

python-pyflakes must be a string: flycheck-pyflakes-executable #8583

sebhahn opened this issue Mar 26, 2017 · 9 comments

Comments

@sebhahn
Copy link
Contributor

sebhahn commented Mar 26, 2017

Description :octocat:

On start-up error of pyflakes error: python-pyflakes must be a string: flycheck-pyflakes-executable

Reproduction guide 🪲

  • Start Emacs
  • pyflakes error

Observed behaviour: 👀 💔
On start-up error of pyflakes error: python-pyflakes must be a string: flycheck-pyflakes-executable

Expected behaviour: ❤️ 😄
No error

System Info 💻

  • OS: gnu/linux
  • Emacs: 24.5.1
  • Spacemacs: 0.200.7
  • Spacemacs branch: develop (rev. 6885863)
  • Graphic display: t
  • Distribution: spacemacs
  • Editing style: vim
  • Completion: helm
  • Layers:
(ansible
 (auto-completion :variables auto-completion-enable-snippets-in-popup t auto-completion-private-snippets-directory "~/.spacemacs.d/snippets/" auto-completion-enable-help-tooltip nil)
 bibtex c-c   colors custom-org-config emacs-lisp elixir erc erlang ess games
 (git :variables git-gutter-use-fringe t)
 github gnus html ipython-notebook latex lua markdown
 (org :variables org-enable-reveal-js-support t)
 pandoc pdf-tools plantuml ranger research-config ruby search-engine semantic
 (shell :variables shell-default-shell 'term shell-default-term-shell "/bin/zsh")
 speed-reading spell-checking tmux version-control yaml)

Backtrace 🐾

Debugger entered--Lisp error: (error "Command executable for syntax checker python-pyflakes must be a string: flycheck-pyflakes-executable")
  signal(error ("Command executable for syntax checker python-pyflakes must be a string: flycheck-pyflakes-executable"))
  error("Command executable for syntax checker %s must be a string: %S" python-pyflakes flycheck-pyflakes-executable)
  flycheck-define-command-checker(python-pyflakes "A Python syntax and style checker using the pyflakes utility.\n\nSee URL `http://pypi.python.org/pypi/pyflakes'." :command (flycheck-pyflakes-executable source-inplace) :error-patterns ((error line-start (file-name) ":" line ":" (message) line-end)) :modes python-mode :next-checkers nil :standard-input nil :working-directory nil)
  byte-code("\300\301\302\303\304\305\306\307\310\311&	\210\312\313\314\315\316\317\320\321\322\323\302\324\302\325\302&�\210\326\327\313\"\210\330\331!\207" [custom-declare-variable flycheck-python-pyflakes-executable nil "The executable of the python-pyflakes syntax checker.\n\nEither a string containing the name or the path of the\nexecutable, or nil to use the default executable from the syntax\nchecker declaration.\n\nThe default executable is flycheck-pyflakes-executable." :type (choice (const :tag "Default executable" nil) (string :tag "Name or path")) :group flycheck-executables :risky t flycheck-define-command-checker python-pyflakes "A Python syntax and style checker using the pyflakes utility.\n\nSee URL `http://pypi.python.org/pypi/pyflakes'." :command (flycheck-pyflakes-executable source-inplace) :error-patterns ((error line-start (file-name) ":" line ":" (message) line-end)) :modes python-mode :next-checkers :standard-input :working-directory add-to-list flycheck-checkers provide flycheck-pyflakes] 15)
  require(flycheck-pyflakes nil t)
  (not (require (quote flycheck-pyflakes) nil (quote t)))
  (if (not (require (quote flycheck-pyflakes) nil (quote t))) (ignore (message (format "Cannot load %s" (quote flycheck-pyflakes)))))
  (prog1 (if (not (require (quote flycheck-pyflakes) nil (quote t))) (ignore (message (format "Cannot load %s" (quote flycheck-pyflakes))))) (let ((elapsed (float-time (time-subtract (current-time) now)))) (if (> elapsed 0.1) (message "%s...done (%.3fs)" "Loading package flycheck-pyflakes" elapsed) (message "%s...done" "Loading package flycheck-pyflakes"))))
  (let ((now (current-time))) (message "%s..." "Loading package flycheck-pyflakes") (prog1 (if (not (require (quote flycheck-pyflakes) nil (quote t))) (ignore (message (format "Cannot load %s" (quote flycheck-pyflakes))))) (let ((elapsed (float-time (time-subtract (current-time) now)))) (if (> elapsed 0.1) (message "%s...done (%.3fs)" "Loading package flycheck-pyflakes" elapsed) (message "%s...done" "Loading package flycheck-pyflakes")))))
  (use-package flycheck-pyflakes)
  python-config/init-flycheck-pyflakes()
  funcall(python-config/init-flycheck-pyflakes)
  (let* ((pkg-name (eieio-oref pkg (quote :name))) (owner (car (eieio-oref pkg (quote :owners))))) (spacemacs-buffer/message (format "Configuring %S..." pkg-name)) (mapc (function (lambda (layer) (if (configuration-layer/layer-usedp layer) (progn (if (not ...) (spacemacs-buffer/message ...) (spacemacs-buffer/message ...) (condition-case err ... ...)))))) (eieio-oref pkg (quote :pre-layers))) (spacemacs-buffer/message (format "  -> init (%S)..." owner)) (funcall (intern (format "%S/init-%S" owner pkg-name))) (mapc (function (lambda (layer) (if (configuration-layer/layer-usedp layer) (progn (if (not ...) (spacemacs-buffer/message ...) (spacemacs-buffer/message ...) (condition-case err ... ...)))))) (eieio-oref pkg (quote :post-layers))))
  configuration-layer//configure-package([object cfgl-package "flycheck-pyflakes" flycheck-pyflakes nil (python-config) nil nil elpa t nil nil nil nil])
  (cond ((eq (quote dotfile) (car (eieio-oref pkg (quote :owners)))) (spacemacs-buffer/message (format "%S is configured in the dotfile." pkg-name))) (t (configuration-layer//configure-package pkg)))
  (cond ((eieio-oref pkg (quote :lazy-install)) (spacemacs-buffer/message (format "%S ignored since it can be lazily installed." pkg-name))) ((and (eieio-oref pkg (quote :excluded)) (not (eieio-oref pkg (quote :protected)))) (spacemacs-buffer/message (format "%S ignored since it has been excluded." pkg-name))) ((null (eieio-oref pkg (quote :owners))) (spacemacs-buffer/message (format "%S ignored since it has no owner layer." pkg-name))) ((not (cfgl-package-enabledp pkg)) (spacemacs-buffer/message (format "%S is toggled off." pkg-name))) (t (let ((dir (configuration-layer/get-location-directory pkg-name (eieio-oref pkg (quote :location)) (car (eieio-oref pkg ...))))) (if dir (progn (add-to-list (quote load-path) dir)))) (if (memq (eieio-oref pkg (quote :location)) (quote (local site built-in))) nil (configuration-layer//activate-package pkg-name)) (cond ((eq (quote dotfile) (car (eieio-oref pkg (quote :owners)))) (spacemacs-buffer/message (format "%S is configured in the dotfile." pkg-name))) (t (configuration-layer//configure-package pkg)))))
  (let ((pkg (configuration-layer/get-package pkg-name))) (cond ((eieio-oref pkg (quote :lazy-install)) (spacemacs-buffer/message (format "%S ignored since it can be lazily installed." pkg-name))) ((and (eieio-oref pkg (quote :excluded)) (not (eieio-oref pkg (quote :protected)))) (spacemacs-buffer/message (format "%S ignored since it has been excluded." pkg-name))) ((null (eieio-oref pkg (quote :owners))) (spacemacs-buffer/message (format "%S ignored since it has no owner layer." pkg-name))) ((not (cfgl-package-enabledp pkg)) (spacemacs-buffer/message (format "%S is toggled off." pkg-name))) (t (let ((dir (configuration-layer/get-location-directory pkg-name (eieio-oref pkg ...) (car ...)))) (if dir (progn (add-to-list (quote load-path) dir)))) (if (memq (eieio-oref pkg (quote :location)) (quote (local site built-in))) nil (configuration-layer//activate-package pkg-name)) (cond ((eq (quote dotfile) (car (eieio-oref pkg ...))) (spacemacs-buffer/message (format "%S is configured in the dotfile." pkg-name))) (t (configuration-layer//configure-package pkg))))))
  (while --dolist-tail-- (setq pkg-name (car --dolist-tail--)) (spacemacs-buffer/loading-animation) (let ((pkg (configuration-layer/get-package pkg-name))) (cond ((eieio-oref pkg (quote :lazy-install)) (spacemacs-buffer/message (format "%S ignored since it can be lazily installed." pkg-name))) ((and (eieio-oref pkg (quote :excluded)) (not (eieio-oref pkg (quote :protected)))) (spacemacs-buffer/message (format "%S ignored since it has been excluded." pkg-name))) ((null (eieio-oref pkg (quote :owners))) (spacemacs-buffer/message (format "%S ignored since it has no owner layer." pkg-name))) ((not (cfgl-package-enabledp pkg)) (spacemacs-buffer/message (format "%S is toggled off." pkg-name))) (t (let ((dir (configuration-layer/get-location-directory pkg-name ... ...))) (if dir (progn (add-to-list ... dir)))) (if (memq (eieio-oref pkg (quote :location)) (quote (local site built-in))) nil (configuration-layer//activate-package pkg-name)) (cond ((eq (quote dotfile) (car ...)) (spacemacs-buffer/message (format "%S is configured in the dotfile." pkg-name))) (t (configuration-layer//configure-package pkg)))))) (setq --dolist-tail-- (cdr --dolist-tail--)))
  (let ((--dolist-tail-- packages) pkg-name) (while --dolist-tail-- (setq pkg-name (car --dolist-tail--)) (spacemacs-buffer/loading-animation) (let ((pkg (configuration-layer/get-package pkg-name))) (cond ((eieio-oref pkg (quote :lazy-install)) (spacemacs-buffer/message (format "%S ignored since it can be lazily installed." pkg-name))) ((and (eieio-oref pkg (quote :excluded)) (not (eieio-oref pkg ...))) (spacemacs-buffer/message (format "%S ignored since it has been excluded." pkg-name))) ((null (eieio-oref pkg (quote :owners))) (spacemacs-buffer/message (format "%S ignored since it has no owner layer." pkg-name))) ((not (cfgl-package-enabledp pkg)) (spacemacs-buffer/message (format "%S is toggled off." pkg-name))) (t (let ((dir ...)) (if dir (progn ...))) (if (memq (eieio-oref pkg ...) (quote ...)) nil (configuration-layer//activate-package pkg-name)) (cond ((eq ... ...) (spacemacs-buffer/message ...)) (t (configuration-layer//configure-package pkg)))))) (setq --dolist-tail-- (cdr --dolist-tail--))))
  configuration-layer//configure-packages-2((2048-game abbrev ac-ispell ace-jump-helm-line ace-link ace-window adaptive-wrap aggressive-indent alchemist anaconda-mode ansi-colors ansible ansible-doc archive-mode auctex auctex-latexmk auto-compile auto-complete auto-dictionary auto-highlight-symbol auto-yasnippet avy biblio biblio-core bookmark bracketed-paste bundler cc-mode centered-buffer-mode centered-cursor chruby clang-format clean-aindent-mode cmake-mode color-identifiers-mode column-enforce-mode comint company company-anaconda company-ansible company-auctex company-c-headers company-quickhelp company-statistics company-web conf-mode css-mode cython-mode debug default-helm-config ...))
  configuration-layer//configure-packages((2048-game abbrev ac-ispell ace-jump-helm-line ace-link ace-window adaptive-wrap aggressive-indent alchemist anaconda-mode ansi-colors ansible ansible-doc archive-mode async auctex auctex-latexmk auto-compile auto-complete auto-dictionary auto-highlight-symbol auto-yasnippet avy biblio biblio-core bind-key bind-map bookmark bracketed-paste bundler cc-mode centered-buffer-mode centered-cursor chruby clang-format clean-aindent-mode cmake-mode color-identifiers-mode column-enforce-mode comint company company-anaconda company-ansible company-auctex company-c-headers company-quickhelp company-statistics company-web conf-mode css-mode ...))
  configuration-layer/sync()
  (if (not (version<= spacemacs-emacs-min-version emacs-version)) (error (concat "Your version of Emacs (%s) is too old. " "Spacemacs requires Emacs version %s or above.") emacs-version spacemacs-emacs-min-version) (load-file (concat (file-name-directory load-file-name) "core/core-load-paths.el")) (require (quote core-spacemacs)) (spacemacs/init) (configuration-layer/sync) (spacemacs-buffer/display-startup-note) (spacemacs/setup-startup-hook) (require (quote server)) (if (server-running-p) nil (server-start)))
  eval-buffer(#<buffer  *load*> nil "/home/shahn/.emacs.d/init.el" nil t)  ; Reading at buffer position 1264
  load-with-code-conversion("/home/shahn/.emacs.d/init.el" "/home/shahn/.emacs.d/init.el" t t)
  load("/home/shahn/.emacs.d/init" t t)
  #[0 "�\205\262�	\306=\203��\307�\310Q\202;�	\311=\204��\307�\312Q\202;�\313\307\314\315#\203*�\316\202;�\313\307\314\317#\203:�\320\nB�\321\202;�\316\322�\323�\322\211#\210�\322=\203a�\324\325\326\307�\327Q!\"\323�\322\211#\210�\322=\203`���\210�\203\243�\330�!\331\232\203\243�\332�!\211\333P\334�!\203}�\211\202\210�\334�!\203\207��\202\210�\314\262��\203\241�\335��\"\203\237�\336\337��#\210\340\341!\210��\266�\f?\205\260�\314�\323\342\322\211#)\262�\207" [init-file-user system-type delayed-warnings-list user-init-file inhibit-default-init inhibit-startup-screen ms-dos "~" "/_emacs" windows-nt "/.emacs" directory-files nil "^\\.emacs\\(\\.elc?\\)?$" "~/.emacs" "^_emacs\\(\\.elc?\\)?$" (initialization "`_emacs' init file is deprecated, please use `.emacs'") "~/_emacs" t load expand-file-name "init" file-name-as-directory "/.emacs.d" file-name-extension "elc" file-name-sans-extension ".el" file-exists-p file-newer-than-file-p message "Warning: %s is newer than %s" sit-for 1 "default"] 7 "\n\n(fn)"]()
  command-line()
  normal-top-level()
@bmag
Copy link
Collaborator

bmag commented Mar 27, 2017

From the backtrace:

python-config/init-flycheck-pyflakes()

You need to fix your configuration for flycheck-pyflakes. Check if anything in your config sets flycheck-pyflakes-executable (including custom-set-* sections).

@sebhahn
Copy link
Contributor Author

sebhahn commented Mar 27, 2017

Thanks @bmag, I thought it was a general problem! Isn't the value set automatically here?

@bmag
Copy link
Collaborator

bmag commented Mar 28, 2017

defvar sets the value only if the variable hasn't been set elsewhere. Your config probably sets it at some point. For more info: https://www.gnu.org/software/emacs/manual/html_node/elisp/index.html

@sebhahn
Copy link
Contributor Author

sebhahn commented Mar 28, 2017

Is there an easy way to find where it has been set before?

@bmag
Copy link
Collaborator

bmag commented Mar 28, 2017

You can search ~/.emacs.d, ~/.spacemacs and ~/.spacemacs.d/ (if you have one) for "flycheck-pyflakes-executable", using a standard search tool.

@sebhahn
Copy link
Contributor Author

sebhahn commented Mar 28, 2017

Thanks! Isn't it set using the :command here

Sorry for these kind of questions, but I'm a Lisp newbie.

@bmag
Copy link
Collaborator

bmag commented Mar 28, 2017

Can't say for sure without reading Flycheck's code, but I doubt it. Looks like it's used there, not set.

@Wilfred
Copy link

Wilfred commented Mar 30, 2017

Woops! Sorry about that folks. I've fixed this in flycheck-pyflakes so it should now work if you upgrade.

@sebhahn
Copy link
Contributor Author

sebhahn commented Mar 31, 2017

Latest update fixes the problem! Thanks @Wilfred! 👍

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

No branches or pull requests

3 participants