You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a function named "print_file" in the text editor. The contents or arguments of the function have no effect on the error. The function name is the critical part. Changing the function name prevents this error. Using: Windows 10, Python 3.6 Anaconda install. Anaconda 3 64-bit
Run the cell to load the function into the IPython console.
Enter the function in the console. This error is generated by typing the open parentheses "("
What is the expected output? What do you see instead?
Because changing the function itself does not affect this error, there is no specific expected output. Multiple functions were tried. This causes the Spyder error popup window to appear. Clicking "OK" on the window closes it and the function can be run normally in the IPython console afterwards.
Please provide any additional information below
File "C:\Users\steve\Anaconda3\lib\site-packages\spyder\plugins\help.py", line 92, in validate
valid = self.is_valid(qstr)
File "C:\Users\steve\Anaconda3\lib\site-packages\spyder\plugins\help.py", line 74, in is_valid
return shell.is_defined(objtxt, force_import=True)
File "C:\Users\steve\Anaconda3\lib\site-packages\spyder\widgets\internalshell.py", line 467, in is_defined
return self.interpreter.is_defined(objtxt, force_import)
File "C:\Users\steve\Anaconda3\lib\site-packages\spyder\interpreter.py", line 312, in is_defined
namespace=self.locals)
File "C:\Users\steve\Anaconda3\lib\site-packages\spyder\utils\dochelpers.py", line 305, in isdefined
module = import(base, globals(), namespace)
File "C:\Users\steve\Documents\Online Classes\Coursera Python Programming Introduction\print_file.py", line 6, in
filename = sys.argv[1]
IndexError: list index out of range
Thanks for reporting. I was unable to reproduce this error in Spyder 3.2.6 on Windows 8.1 Pro x64 with Python 3.6.4 x64 and the same versions of Qt, IPython, qtconsole, rope, jedi, and sphix as you. Please try updating Spyder and Python, and seeing if the error reoccurs. For reference, I stuck the function
Description
What steps will reproduce the problem?
What is the expected output? What do you see instead?
Because changing the function itself does not affect this error, there is no specific expected output. Multiple functions were tried. This causes the Spyder error popup window to appear. Clicking "OK" on the window closes it and the function can be run normally in the IPython console afterwards.
Please provide any additional information below
File "C:\Users\steve\Anaconda3\lib\site-packages\spyder\plugins\help.py", line 92, in validate
valid = self.is_valid(qstr)
File "C:\Users\steve\Anaconda3\lib\site-packages\spyder\plugins\help.py", line 74, in is_valid
return shell.is_defined(objtxt, force_import=True)
File "C:\Users\steve\Anaconda3\lib\site-packages\spyder\widgets\internalshell.py", line 467, in is_defined
return self.interpreter.is_defined(objtxt, force_import)
File "C:\Users\steve\Anaconda3\lib\site-packages\spyder\interpreter.py", line 312, in is_defined
namespace=self.locals)
File "C:\Users\steve\Anaconda3\lib\site-packages\spyder\utils\dochelpers.py", line 305, in isdefined
module = import(base, globals(), namespace)
File "C:\Users\steve\Documents\Online Classes\Coursera Python Programming Introduction\print_file.py", line 6, in
filename = sys.argv[1]
IndexError: list index out of range
Version and main components
Dependencies
The text was updated successfully, but these errors were encountered: