syl20bnr / spacemacs

A community-driven Emacs distribution - The best editor is neither Emacs nor Vim, it's Emacs *and* Vim!
http://spacemacs.org
GNU General Public License v3.0
23.58k stars 4.9k forks source link

Enabling OpenAI layer constantly raising errors on start-up or when I try to call dall-e directly #16270

Closed SemyonSinchenko closed 3 months ago

SemyonSinchenko commented 5 months ago

Description :octocat:

Errors in openai layer

Reproduction guide :beetle:

Observed behaviour: :eyes: :broken_heart: Error on startup or on a trying to call dall-e/new:

Error (use-package): dall-e/:catch: Eager macro-expansion failure: (wrong-number-of-arguments (4 . 4) 6)

Maintainer of dall-e package told me that the problem is not in the dall-e package itself, but in how spacemacs works with tblui.

Link to the his comment in issue, that I raised in dall-e repository: https://github.com/emacs-openai/dall-e/issues/3#issuecomment-1920221981

Expected behaviour: :heart: :smile: No error.

System Info :computer:

Backtrace :paw_prints:

Debugger entered--Lisp error: (error "Eager macro-expansion failure: (wrong-number-of-ar...")
  error("Eager macro-expansion failure: %S" (wrong-number-of-arguments (4 . 4) 6))
  internal-macroexpand-for-load((tblui-define openai-image "OpenAI Image" "Display image information from OpenAI." (lambda nil openai-image-entries) [("URL" 200 nil)] nil) nil)
  load-with-code-conversion("/home/sem/.emacs.d/elpa/29.1/develop/openai-202401..." "/home/sem/.emacs.d/elpa/29.1/develop/openai-202401..." nil t)
  require(openai-image)
  load-with-code-conversion("/home/sem/.emacs.d/elpa/29.1/develop/dall-e-202401..." "/home/sem/.emacs.d/elpa/29.1/develop/dall-e-202401..." nil t)
  command-execute(dall-e-new record)
  helm-M-x-execute-command(dall-e-new)
  helm-execute-selection-action-1()
  helm-execute-selection-action()
  helm-internal((((name . "Emacs Commands history") (init #f(compiled-function () #<bytecode -0x543e6b7fb535d09>)) (candidates . helm-candidates-in-buffer) (cleanup . helm-M-x--unwi
smile13241324 commented 3 months ago

I am sorry but it seems I am not able to reproduce your issue, I have loaded the openai layer and I am not seeing any error at startup, I can also call dall-e-new without causing an error, except that I am not having an api key.

I have also looked for tblui and noticed that this is non of the packages owned by one of the layers in Spacemacs, instead its a sub package called from the openai package, which is required by dall-e.

Therefore I don't think that this is our bug, instead its an issue in the interaction between the openai, dall-e and tblui packages and must be resolved there.