joshcho / ChatGPT.el

ChatGPT in Emacs
GNU General Public License v3.0
397 stars 34 forks source link

Error: symbol's value as variable is void #33

Closed apcode closed 1 year ago

apcode commented 1 year ago

Emacs 28.2

Commands not working. For example: chatgpt-query prompts for query but minibuffer shows the error: "symbol's value as variable is void: python-interpreter"

chatgpt-login works and successfully opens up a buffer that can interact.

apcode commented 1 year ago

Seems epc:epc-start doesn't exist.

I've pip installed epc Do I have to install epc on emacs too? It doesn't mention that in the doc.

apcode commented 1 year ago

'''M-x describe-variable python-intepreter

python-shell-interpreter is a variable defined in ‘python.el’.

Its value is "python3" ''' And yet, when I run chatgpt-query I get: "symbol's value as variable is void: python-interpreter"

apcode commented 1 year ago

If I run M-x describe-variable python-interpreter I get the correct value of the variable.

However, if I eval (describe-variable 'python-interpreter) in the scratch buffer I get a nil value.

Likely some basic emacs issue I'm seeing but advice would be approeciated.

deniskolosov commented 1 year ago

@apcode Try to set it when initializing the package:

(use-package chatgpt
  :quelpa ((chatgpt :fetcher git :url "https://github.com/joshcho/ChatGPT.el.git") :upgrade t)
  :init
  (require 'python)
  (setq python-interpreter "python3")
  (setq chatgpt-repo-path (expand-file-name "chatgpt/" quelpa-build-dir))
  :bind ("C-c q" . chatgpt-query))
apcode commented 1 year ago

that worked, thanks.