joshcho / ChatGPT.el

ChatGPT in Emacs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error: symbol's value as variable is void

apcode opened this issue · comments

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.

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.

'''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"

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.

@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))

that worked, thanks.