This is the code I am trying to run.

x = int(input("Please enter and integer: "))

for n in range(2,x+1):
    for t in range(2, n):
            if n%t ==0:
                print(n,'equals',t,'*', n/t)
                break
    else:
        print(n, 'is a prime number')

This is the error code I keep on getting. Worth noting that the code works if x has a predetermined variable.

Traceback (most recent call last):
  File "C:\Users\ausam\anaconda3\lib\site-packages\qtconsole\base_frontend_mixin.py", line 138, in _dispatch
    handler(msg)
  File "C:\Users\ausam\anaconda3\lib\site-packages\spyder\plugins\ipythonconsole\widgets\debugging.py", line 278, in _handle_input_request
    return super(DebuggingWidget, self)._handle_input_request(msg)
  File "C:\Users\ausam\anaconda3\lib\site-packages\qtconsole\frontend_widget.py", line 512, in _handle_input_request
    self._readline(msg['content']['prompt'], callback=callback, password=msg['content']['password'])
  File "C:\Users\ausam\anaconda3\lib\site-packages\qtconsole\console_widget.py", line 2422, in _readline
    self._show_prompt(prompt, newline=False, separator=False)
TypeError: _show_prompt() got an unexpected keyword argument 'separator'

Any help would be greatly appreciated. Thanks!

🟢 Solution
0

This bug has been reported on Github and is supposedly fixed. See https://github.com/spyder-ide/spyder/issues/17616

Instructions there are to upgrade to 5.3.0.