Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors when running empty cells #1746

Closed
spyder-bot opened this issue Feb 17, 2015 · 2 comments
Closed

Errors when running empty cells #1746

spyder-bot opened this issue Feb 17, 2015 · 2 comments

Comments

@spyder-bot
Copy link
Collaborator

From sylvain....@gmail.com on 2014-03-01T20:46:53Z

Please note that reporting bugs from Spyder's help menu ("?" > "Report
issue...") will fill version details for Spyder, Python and Qt in this description for you.

What steps will reproduce the problem?

  1. On the current development version, put one or two cell delimiters in an empty python file.

    %%

    %%

  2. Place your cursor in either one of the two cells

  3. Hit Ctrl+Enter to run the cell What is the expected output? What do you see instead? Nothing should happen as the cells are empty. Instead, the focus goes to the internal console with errors:

Traceback (most recent call last):
File "/home/sylvain/spyderlib_remote/spyderlib/widgets/editor.py", line 1995, in run_cell
text = self.get_current_editor().get_cell_as_executable_code()
File "/home/sylvain/spyderlib_remote/spyderlib/widgets/sourcecode/base.py", line 502, in get_cell_as_executable_code
text = self.get_selection_as_executable_code()
File "/home/sylvain/spyderlib_remote/spyderlib/widgets/sourcecode/base.py", line 466, in get_selection_as_executable_code
first_line = lines[0].lstrip()
IndexError: list index out of range

Original issue: http://code.google.com/p/spyderlib/issues/detail?id=1746

@spyder-bot
Copy link
Collaborator Author

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2014-04-15T13:42:34Z

This was solved in https://bitbucket.org/spyder-ide/spyderlib/pull-request/25

Status: Verified

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant