-
Notifications
You must be signed in to change notification settings - Fork 162
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
gptel-menu gives error #348
Comments
How did you install gptel? |
I have the same issue. My gptel-menu is no longer working with -v0.9.0. I use spacemacs and included gptel in dotspacemacs-additional-packages as stated in gptel readme. |
Can you produce a backtrace? |
Running emacs-gptel from guix packages @ commit 8c6e724686ac37ff7955b97d9bfd03176b14d82a in a guix shell.
|
I installed it using straight use package. Here is the installation excerpt from my config.
|
Here is the trace.
|
What is the version of transient you're using? To find it you can run
|
Running gptel-menu in emacs 29.4 with gptel v0.8.6 and emacs-transient v0.7.3 works fine. |
Transient,
I updated transient to 0.7.3. Gives the same error. |
I updated transient to version 0.7.3, which caused numerous errors in both Magit and Dirvish. Hence, I decided to do a fresh installation of all the straight packages (it's been 3 years since I updated the packages). After the fresh installation, transient is at version 0.7.3. and |
This commit gptel-menu works fine.
|
I can confirm that gptel-send does not produce an error, and seems to work, after removing ":pad-keys t" from gptel-transient.el. I'm not familiar with transient so I have no more ideas. |
@karthink Yes. using Transient 0.7.3 now. In my opinion source, of the error is some other package. I had the same setup in a new machine with fresh install and there was no error. But it threw the error in my daily machine where most of the packages were old. |
I cannot reproduce this error with the latest version of transient (0.7.4). Can someone experiencing the issue check this? (Note: I couldn't reproduce this with transient 0.7.3 either.) |
Yea, I still get the error with |
I get this error: Debugger entered--Lisp error: (wrong-type-argument (or eieio-object cl-structure-object oclosure) "") |
I'm aware of #361, but as far as I can tell, this is a Transient bug so I don't want to work around it in a way where I'll forget about the hack and cause trouble in the future. If you are experiencing the error, what would really help is a minimal reproducer that combines Something like this, which I can't confirm since I can't reproduce the bug on Transient 0.7.3. (transient-define-prefix test-menu ()
"Change parameters of prompt to send to the LLM."
[:description "Test menu"
[:pad-keys t
""
"Some text"
("2" "Split vertically" split-window-vertically)
("3" "Split horizontally" split-window-horizontally)]]) |
The issue seems to have disappeared for me after updating my guix channel lock. I can reproduce it at guix commit 3e1330b2c74c7ec957c0de69f5253c6bcf045c2f, but somewhere between there and commit c1a0889c4e983dced02720c2ec33ac40af7fec1b it no longer occurs. |
@0x715C Thanks for the update. I'm not sure what to do about it now. |
@karthink I narrowed down the change in guix that allows gptel-menu to function correctly. |
If anyone in this thread is still experiencing this error (with gptel-menu), please let me know. I will close this issue otherwise. |
Just hit this error on Emacs 29.4 + native compilation + latest DOOM on Ubuntu 22.04. Debug output below:
|
Just hit this error on Emacs 29.4 + native compilation + latest DOOM on Ubuntu 22.04. Debug output below:
```
Debugger entered--Lisp error: (wrong-type-argument (or eieio-object cl-structure-object oclosure) "")
transient--exit-and-debug(error (wrong-type-argument (or eieio-object cl-structure-object oclosure) ""))
eieio-oref("" key)
#<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_169>("")
transient--maybe-pad-keys(#<transient-column transient-column-1728abbeb89c> #<transient-columns transient-columns-1728abf7bbc2>)
#f(compiled-function (column) #<bytecode -0x167f82b215082d91>)(#<transient-column transient-column-1728abbeb89c>)
mapcar(#f(compiled-function (column) #<bytecode -0x167f82b215082d91>) (#<transient-column transient-column-1728abf7bbe2> #<transient-column transient-column-1728abbeb89c>))
#f(compiled-function (group) #<bytecode 0x582c7755c19b780>)(#<transient-columns transient-columns-1728abf7bbc2>)
apply(#f(compiled-function (group) #<bytecode 0x582c7755c19b780>) #<transient-columns transient-columns-1728abf7bbc2>)
#f(compiled-function (&rest args) #<bytecode 0xf004b0aa79eaf37>)(#<transient-columns transient-columns-1728abf7bbc2>)
#f(compiled-function (cl--cnm group) #<bytecode -0x484739d4a81d81f>)(#f(compiled-function (&rest args) #<bytecode 0xf004b0aa79eaf37>) #<transient-columns transient-columns-1728abf7bbc2>)
apply(#f(compiled-function (cl--cnm group) #<bytecode -0x484739d4a81d81f>) #f(compiled-function (&rest args) #<bytecode 0xf004b0aa79eaf37>) #<transient-columns transient-columns-1728abf7bbc2>)
#f(compiled-function (group) "Insert GROUP's description, if any." #<bytecode 0x1f2e612c33ae1c37>)(#<transient-columns transient-columns-1728abf7bbc2>)
apply(#f(compiled-function (group) "Insert GROUP's description, if any." #<bytecode 0x1f2e612c33ae1c37>) #<transient-columns transient-columns-1728abf7bbc2> nil)
transient--insert-group(#<transient-columns transient-columns-1728abf7bbc2>)
#<subr transient--insert-groups>()
apply(#<subr transient--insert-groups> nil)
transient--insert-groups()
transient--show()
transient--redisplay()
transient-setup(gptel-menu)
gptel-menu()
funcall-interactively(gptel-menu)
call-interactively(gptel-menu)
(if (and arg (require 'gptel-transient nil t)) (call-interactively #'gptel-menu) (message "Querying %s..." (progn (or (progn (and (memq (type-of gptel-backend) cl-struct-gptel-backend-tags) t)) (signal 'wrong-type-argument (list 'gptel-backend gptel-backend))) (aref gptel-backend 1))) (gptel--sanitize-model) (gptel-request nil :stream gptel-stream) (gptel--update-status " Waiting..." 'warning))
(closure (t) (&optional arg) "Submit this prompt to the current LLM backend.\n\nBy..." (interactive "P") (if (and arg (require 'gptel-transient nil t)) (call-interactively #'gptel-menu) (message "Querying %s..." (progn (or (progn (and ... t)) (signal 'wrong-type-argument (list ... gptel-backend))) (aref gptel-backend 1))) (gptel--sanitize-model) (gptel-request nil :stream gptel-stream) (gptel--update-status " Waiting..." 'warning)))((4))
gptel-org--send-with-props((closure (t) (&optional arg) "Submit this prompt to the current LLM backend.\n\nBy..." (interactive "P") (if (and arg (require 'gptel-transient nil t)) (call-interactively #'gptel-menu) (message "Querying %s..." (progn (or (progn (and ... t)) (signal 'wrong-type-argument (list ... gptel-backend))) (aref gptel-backend 1))) (gptel--sanitize-model) (gptel-request nil :stream gptel-stream) (gptel--update-status " Waiting..." 'warning))) (4))
apply(gptel-org--send-with-props (closure (t) (&optional arg) "Submit this prompt to the current LLM backend.\n\nBy..." (interactive "P") (if (and arg (require 'gptel-transient nil t)) (call-interactively #'gptel-menu) (message "Querying %s..." (progn (or (progn (and ... t)) (signal 'wrong-type-argument (list ... gptel-backend))) (aref gptel-backend 1))) (gptel--sanitize-model) (gptel-request nil :stream gptel-stream) (gptel--update-status " Waiting..." 'warning))) (4))
gptel-send((4))
funcall-interactively(gptel-send (4))
command-execute(gptel-send)
```
1. Can you try rebuilding gptel? Not sure how you do this in Doom, but it involves re-byte-compiling gptel and its dependencies.
2. What is your version of Transient? M-x find-library transient, then look at the header for the version.
|
I also have the same error as in the OP, when I try
My software versions: Is it just because of my older version of transient package? (using the |
I also have the same error as in the OP, when I try `C-u M-x gptel-send`
```
transient-setup: Wrong type argument: (or eieio-object cl-structure-object oclosure), ""
```
My software versions:
Emacs 29.4 (installed from debian bookworm-backports)
Org mode version 9.6.15
Transient version: 0.3.7
Is it just because of my older version of transient package? (using the `elpa-transient` package from debian bookworm)
gptel requires at least Transient 0.4.0, so I'm not sure how you installed gptel. Try updating Transient.
|
@karthink @lkirkwood I was facing the same issue with Doom emacs. After running |
Closing this issue now -- if anyone looking for a solution reads this, try updating the Transient package. If that doesn't work, please open a new issue. |
Apologies for the delayed response.
I deleted the package from
This fixed it! Transient is now version |
I wanted to upgrade gptel because it's now got an improved UI and support for media files (e.g. images). Note: After upgrading `gptel` alone, I started to get a transient-related error when running `gptel-menu`, as discussed in karthink/gptel#348: ``` transient-setup: Wrong type argument: (or eieio-object cl-structure-object oclosure), "" ``` In order to fix the above error, I needed to upgrade `transient` package as well. However, since `transient` (version 0.4.3) is a built-in package for Emacs 29.4, `transient` is not shown in the completion list when running M-x `package-upgrade`. To force emacs to upgrade a built-in package like `transient`, I needed to run `package-upgrade` with the prefix argument.
gtel version - v0.9.0
The text was updated successfully, but these errors were encountered: