Using Spyder 3.2.6 - PYthon 2.7 - Windows 10 - Spanish Keyboard
Crash inside the Spyder IDE @ finder dialog.
When I delete the @ prewritten and try to write :number, just after pressing ":" this functionality crashes.
Thanks for reporting. We'll take a look at this problem in future release.
More specifically, testing this on Spyder 3.3.0 - Python 3.6.6 - Windows 8.1 - US English Keyboard, after I type the : (regardless of what, if anything, is typed before it), I can't type further letter characters or symbol characters, but I can type numbers and it works just fine. Furthermore, I can press Backspace to delete it and then type something else, and everything continues to work. Therefore, it would seem that perhaps something's blocking/handling keypress events for letter/symbol keys, but not numbers or special keys, once : is typed, and stops doing so once it is removed.
As @CAM-Gerlach described, you can only type numbers after typing :.
try to write :number
Perhaps you took number a little too literally, haha?
Hahahah that would be something I'd do haha, but this is not the case. I experience the crash right after I type : so I don't have the chance to even write number or character.
File "C:\Users\Eduardo\Anaconda2\lib\site-packages\spyder\widgets\fileswitcher.py", line 794, in setup
self.setup_file_list(filter_text, current_path)
File "C:\Users\Eduardo\Anaconda2\lib\site-packages\spyder\widgets\fileswitcher.py", line 663, in setup_file_list
_("lines"))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xed' in position 1: ordinal not in range(128)
It seems to be about the ascii coding of my keyboard or something similar.
Okay, thanks for the information. First, update to Spyder 3.3.0 when it comes out on conda in a few days and try again, to ensure the bug hasn't already been fixed, since it has been quite a few months and 3 releases since 32.6. If not, this indeed a real issue @ccordoba12 .
Do any of the files you have open have non-ASCII characters in their names, full paths or contents? That seems to be the issue here, which the Python 2 version Spyder is running under is not designed to natively handle it (and thus the real solution is to upgrade to Python 3; Python 2 is EoLed in less than a year and a half and the scientific Python community has already moved overwhelmingly to Python 3 with Py2 support already dropped by a number of major libraries).
@dalthviz is this still relevant? could you check :-)
@goanpeca checking this with Spyder 3.3.6 and Python 3 I think the behavior is that when typing : you enter the 'go to line mode' and after : the only valid characters to type are numbers. In Spyder 4, when typing : you also enter to the 'go to line mode' but in this case the input isn't limited to numbers.
However, testing with Python 2 an exception is raised when trying to open the Switcher (an UnicodeEncodeError) when a file has characters like 铆:
File "C:\Users\Daniel\Documents\Spyder\spyder\spyder\plugins\editor\utils\switcher.py", line 142, in handle_switcher_modes
self.create_editor_switcher()
File "C:\Users\Daniel\Documents\Spyder\spyder\spyder\plugins\editor\utils\switcher.py", line 172, in create_editor_switcher
last_item=last_item)
File "C:\Users\Daniel\Documents\Spyder\spyder\spyder\widgets\switcher.py", line 655, in add_item
styles=self._item_styles
File "C:\Users\Daniel\Documents\Spyder\spyder\spyder\widgets\switcher.py", line 315, in __init__
self._set_rendered_text()
File "C:\Users\Daniel\Documents\Spyder\spyder\spyder\widgets\switcher.py", line 122, in _set_rendered_text
self.setText(self._render_text())
File "C:\Users\Daniel\Documents\Spyder\spyder\spyder\widgets\switcher.py", line 343, in _render_text
**self._styles)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xed' in position 5: ordinal not in range(128)
So we need to check the handling of unicode characters yep
@goanpeca should I only fix the issue for Spyder 4? this issue is also present in Spyder 3.3.6 with Python 2
@goanpeca should I only fix the issue for Spyder 4?
Yes, only 4