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
{searching for some string in ALL files in current dir}
Then change string for searching and search in just one file
This error appears, Spyder does not freeze, but does not show found occurences of a string
Traceback
Traceback (most recent call last):
File "C:\PROG2\PYTHON\python-3.10.5.amd64\lib\site-packages\spyder\plugins\findinfiles\widgets\results_browser.py", line 263, in append_file_resultself.files[filename] = item = FileMatchItem(
File "C:\PROG2\PYTHON\python-3.10.5.amd64\lib\site-packages\spyder\plugins\findinfiles\widgets\results_browser.py", line 85, in __init__
rel_dirname = dirname.split(path)[1]
IndexError: list index out of range
Hi @mirekslouf thank you for the feedback! This seems like a duplicate of #17443 Seems like you are running Spyder from the dev source (the version captured in the issue says you are using Spyder version: 5.4.0.dev0 (pip). How did you install Spyder? If you are using Spyder from source, using the latest dev source should give you the fix (5.5.0.dev059d547a).
Any other info to help you with the issue is greatly appreciated. Let us know!
@dalthviz, I think I didn't fix issue #17443 correctly and @mirekslouf reproduction steps helped me to understand why. The problem is Find in files is currently broken when searching in a single file. PR #19124 avoided the error reported here, but doesn't allow to display the search results in the pane.
So, I'll remove my previous fix and add a new one that properly addresses the problem.
ccordoba12
changed the title
{Find in files} gives error when searching in just one file
Find in files gives error when searching in just one file
May 28, 2023
Description
What steps will reproduce the problem?
Traceback
Versions
Dependencies
The text was updated successfully, but these errors were encountered: