I’m giving an introductory course in Python programming for high-school students and we have encountered a problem with Anaconda/spyder on Mac.
Many of my students get a problem when trying to use the input function and get the following error message:
Traceback (most recent call last): File “/Users/user/opt/anaconda3/lib/python3.9/site-packages/qtconsole/base_frontend_mixin.py”, line 138, in _dispatch handler(msg) File “/Users/user/opt/anaconda3/lib/python3.9/site-packages/spyder/plugins/ipythonconsole/widgets/debugging.py”, line 267, in _handle_input_request return super(DebuggingWidget, self)._handle_input_request(msg) File “/Users/user/opt/anaconda3/lib/python3.9/site-packages/qtconsole/frontend_widget.py”, line 516, in _handle_input_request self._readline(msg[‘content’][‘prompt’], callback=callback, password=msg[‘content’][‘password’]) File “/Users/user/opt/anaconda3/lib/python3.9/site-packages/qtconsole/console_widget.py”, line 2413, in _readline self._show_prompt(prompt, newline=False, separator=False) TypeError: _show_prompt() got an unexpected keyword argument ‘separator’
In short, when running a script containing input(), Spyder crashes. It looks like a problem with the IPython console itself because when using an external terminal everything works fine. The only difference I can see between my version and the students’ is that I run Python 3.9.7 and they run 3.9.12. We all use Spyder 5.1.5 running on Mac.
Is there an easy solution to this?