Hi, There is an unexpected error message happening with function `python-shell-completion-at-point`. > Wrong type argument: processp, nil It happened because the function does NOT check the process param. The patch will check the param and display a user error message gracefully. Steps to reproduce the issue. 1. $ emacs -q /tmp/a.py # start emacs and open a python source file 2. type "C-c C-p" (or M-x run-python) to start a python shell 3. type exit() to stop the python process but the buffer still exists 4. M-x python-shell-completion-at-point will get the error message Please help review the patch. Thanks. Regards