BTW, you will get a more complete backtrace if you load the source file instead of the byte-compiled file, for the code that defines run-python. (https://emacs.stackexchange.com/a/20265/12031)

How do I load the source file for debug purpose?

currently I have

Debugger entered--Lisp error: (wrong-type-argument arrayp nil)
  replace-regexp-in-string("\\`\\^" "" nil)
  python-shell-comint-end-of-output-p(">>> ")
  python-eldoc-function(#f(compiled-function (string &rest plist) #<bytecode -0xec60eba7fe247cd>))
  #f(compiled-function (f) #<bytecode -0x191cde0269aa4cd>)(python-eldoc-function)
  #<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_11>()
  apply(#<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_11> nil)
  timer-event-handler([t 0 0 500000 nil #<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_11> nil idle 0 nil])

1 Answer 1


Simply specify the .el suffix explicitly, using any of the load methods.

Interactively, that's one of:

  • M-x load-library RET python.el
  • M-x load-file RET /path/to/python.el

Or you can visit the .el file and use M-x eval-buffer

  • python.el was a problem in the linked question, but in this question it looks as if eldoc stuff needs to be loaded: all of the byte-compiled gobbledegook seems to come from a timer that runs an anonymous function (sigh...) and functions called from eldoc-documentation-compose-1 and python-eldoc-function. Loading python.el is not going to help in this case.
    – NickD
    Commented Jul 29, 2023 at 15:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.