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
Paths in the "Search in" combobox of the "Find in File" plugin becomes corrupted #5306
Comments
Here is a traceback: Traceback (most recent call last):
File "C:\Users\jsgosselin\spyder\spyder\widgets\findinfiles.py", line 114, in run
self.find_files_in_path(self.rootpath)
File "C:\Users\jsgosselin\spyder\spyder\widgets\findinfiles.py", line 132, in find_files_in_path
for path, dirs, files in os.walk(path):
File "C:\Python36\lib\os.py", line 335, in walk
top = fspath(top)
TypeError: expected str, bytes or os.PathLike object, not NoneType |
@andfoy, please take a look at this one. |
@andfoy Would you mind if I take a look at this? I would like to fix this bug for the next release. |
Jean, please go ahead and fix it 👍 |
@ccordoba12 In addition to solve this issue, I had some ideas to improve how the
|
File "C:\Users\jsgosselin\spyder\spyder\widgets\findinfiles.py", line 408, in path_selection_changed
self.external_path = item.path
AttributeError: 'QListWidgetItem' object has no attribute 'path' |
Jean, I agree with all your suggestions. |
The traceback posted in #5306 (comment) does not seem to be related to the undesired behavior described in the OP. Traceback (most recent call last):
File "C:\Users\jsgosselin\spyder\spyder\widgets\findinfiles.py", line 115, in run
self.find_files_in_path(self.rootpath)
File "C:\Users\jsgosselin\spyder\spyder\widgets\findinfiles.py", line 133, in find_files_in_path
for path, dirs, files in os.walk(path):
File "C:\Python36\lib\os.py", line 335, in walk
top = fspath(top)
TypeError: expected str, bytes or os.PathLike object, not NoneType To reproduce this error:
|
The traceback posted in #5306 (comment). does not seem to be related to the undesired behavior described in the OP. So far unfortunately, I have not been successful to produce a reproducible example of the issue described in the OP. Traceback (most recent call last):
File "C:\Users\jsgosselin\spyder\spyder\widgets\findinfiles.py", line 408, in path_selection_changed
item = self.path_selection_contents.item(idx)
AttributeError: 'QListWidgetItem' object has no attribute 'path' To reproduce this error:
|
Ok, I found out how to reproduce the behaviour described in the OP 😂. This is happening when Enter is pressed when the focus is on the The currently selected path is then moved at the beginning of the list, and an empty item is also added. This behaviour is explained by the Because of this, the wrong information is saved in the configuration file when the |
Great! So PR coming? |
@ccordoba12 Do I fix the 3 issues I've found while investigating this (see #5306 (comment), #5306 (comment), and #5306 (comment)) and do I implement the 4 proposed enhancements (see #5306 (comment)) in the same PR or do I split this in smaller, individual PR? |
Everything in one PR seems easier to me because all fixes/improvements are related. |
@ccordoba12 Alright thank you. The PR is on the way :) |
Ok, moving this one to 3.2.6 then :-) |
Description of your problem
Related to PR #4822 that fixed Issues #4814 and #4809.
What steps will reproduce the problem?
What is the expected output? What do you see instead?
Sometimes, Other directories in the Search in combobox of the Find in File plugin becomes corrupted with no way of removing them. For instance, the
<PyQt5.QtWidgets.QListWidget...
shown in the screenshot below was actuallyC:\Users\jsgosselin\spyder
before it became corrupted at some point. This is the third time that this problem occurs for me.Besides, I think an option should be added below Select other directory to clear the list.
Please provide any additional information below
Versions and main components
Dependencies
IPython >=4.0 : 6.1.0 (OK)
cython >=0.21 : 0.25.2 (OK)
jedi >=0.9.0 : 0.10.2 (OK)
nbconvert >=4.0 : 5.2.1 (OK)
numpy >=1.7 : 1.13.0 (OK)
pandas >=0.13.1 : 0.20.3 (OK)
pycodestyle >=2.3: 2.3.1 (OK)
pyflakes >=0.6.0 : 1.5.0 (OK)
pygments >=2.0 : 2.2.0 (OK)
pylint >=0.25 : 1.7.1 (OK)
qtconsole >=4.2.0: 4.4.0.dev (OK)
rope >=0.9.4 : 0.10.7 (OK)
sphinx >=0.6.6 : 1.6.2 (OK)
sympy >=0.7.3 : None (NOK)
The text was updated successfully, but these errors were encountered: