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

Find in Files not working after 3.1.0 update #4005

Closed
nbonacchi opened this issue Jan 19, 2017 · 23 comments
Closed

Find in Files not working after 3.1.0 update #4005

nbonacchi opened this issue Jan 19, 2017 · 23 comments

Comments

@nbonacchi
Copy link

Description of your problem

Find in Files produces no output, no internal error (internal console didn't pop up), no error message in bash. Answer is always the same e.g. if searching for range: 'range' - String not found

What steps will reproduce the problem?

  1. Update to 3.1.0 on Ubuntu Linux 14.04
  2. open spyder
  3. Search -> Find in Files
  4. type any term you know exists in files

What is the expected output? What do you see instead?
list of files and row number where term exist

Please provide any additional information below
Just updated and it stopped working

Versions and main components

  • Spyder Version: 3.1.0
  • Python Version: 3.5.2
  • Operating system: Linux 3.13.0-108-generic x86_64 GNU/Linux Ubuntu 14.04.5 LTS

Dependencies

Please go to the menu entry Help > Optional Dependencies (or
Help > Dependencies), press the button Copy to clipboard
and paste the contents below:
jedi >=0.8.1 : 0.9.0 (OK)
matplotlib >=1.0 : 1.5.3 (OK)
nbconvert >=4.0 : 4.2.0 (OK)
numpy >=1.7 : 1.11.1 (OK)
pandas >=0.13.1 : 0.18.1 (OK)
pep8 >=0.6 : 1.7.0 (OK)
psutil >=0.3 : 5.0.0 (OK)
pyflakes >=0.6.0 : 1.3.0 (OK)
pygments >=2.0 : 2.1.3 (OK)
pylint >=0.25 : 1.6.4 (OK)
qtconsole >=4.2.0: 4.2.1 (OK)
rope >=0.9.4 : 0.9.4-1 (OK)
sphinx >=0.6.6 : 1.4.6 (OK)
sympy >=0.7.3 : 1.0 (OK)

@ccordoba12
Copy link
Member

@andfoy, please take a look at this one to see what's happening.

@ccordoba12 ccordoba12 added this to the v3.1.2 milestone Jan 19, 2017
@andfoy
Copy link
Member

andfoy commented Jan 20, 2017

@nbonacchi Did you tried to use the function by opening a project?

@andfoy
Copy link
Member

andfoy commented Jan 20, 2017

Here is the proof that it actually works.
captura de pantalla de 2017-01-20 10-45-44

@ccordoba12 ccordoba12 modified the milestones: v3.1.2, v3.1.3 Jan 22, 2017
@mherrmann3
Copy link

I can confirm @nbonacchi's discovery: Find in Files doesn't work in the recent spyder version. It doesn't even seem to start searching (e.g., in a large directory).

@nbonacchi
Copy link
Author

Sorry guys for some reason I didn't get any notification for this issue. It should work now...

@andfoy I didn't even know that spyder had projects. I use spyder for my everyday coding and for the python class I teach in my PhD program, usually people come from matlab and its easier to just load the matlab 'skin' and work with the file explorer like they are used to. In general I don't like projects, as all boilerplate project files that are usually created in other UI's don't make sense for small/mid size projects and get more in the way of starting to code than actually help, I will definitely check it out though and form an opinion on it.

So if I'm not in a project it does NOT work.
Another (maybe related) problem, case sensitivity in editor while Ctrl+F also doesn't seem to work.

These are the 2 main 'refactoring' tools I use... I can always use grep or ack or sed or one of the many alternatives that exist, but staying within spyder would be preferrable.

Also I just updated to 3.1.2 and still same problem persists.

@andfoy
Copy link
Member

andfoy commented Jan 26, 2017

@nbonacchi Thanks for the reply! I'll check the function without loading a project. Now, about the case sensitivity, please open a new issue, to keep track of it. Finally, we're now implementing a brand-new system console (OS independent) which should integrate with Spyder, it should be ready for the next release as an optional plugin.

@andfoy
Copy link
Member

andfoy commented Jan 26, 2017

@ccordoba12 @nbonacchi I'll check the finder, it seems that is broken

@andfoy
Copy link
Member

andfoy commented Jan 26, 2017

@ccordoba12 Isn't it too ineficient to recover first all the files recursively and then scanning all the found files?

# spyder.widgets.findinfiles.py - Line 152
ok = self.find_files_in_path(self.rootpath)
if ok:
     self.find_string_in_files()

@andfoy
Copy link
Member

andfoy commented Jan 27, 2017

@nbonacchi Can I have more information about the test scenario? I can't reproduce the crash

@nbonacchi
Copy link
Author

nbonacchi commented Jan 28, 2017

@andfoy I'm not sure what I can do to help,
So here's the story of my life...
I have a miniconda installation on my ubuntu 14.04 (yes I know I should upgrade but its my data analysis computer and I'm finishing my papers/PhD so only after that is done) I also have a laptop with ubuntu 16.04. On both systems I created a python 2.7 and a python 3.5 environment, I installed spyder everywhere and up till ver 3.1.0 everything was fine and dandy. I "conda update spyder" as prompted and for ver 3.1.1 on both systems and on both environments Find in Files didn't work. After updating to 3.1.2 it seems to work for 16.04 but still not in 14.04.... Maybe some unmet dependency?

I also have spyder2 installed system wide for both python3.4 and 2.7, I only mention this because although spyder3 is in virtual environments I notice some interactions at the level of the UI namely because I think all spyder instalations use the ~/.spyder2 and the ~/.spyder2-py3 folders to save stuff from one session to the next.
Let me know if there is something else I can tell you...

UPDATE: Ignore the last paragraph, I just noticed a ~/.config/spyder and ~/.config/spyder-py3 folder I think the new spyder3 uses, so it can't be that...

@nbonacchi
Copy link
Author

Someone else opened the case sensitivity bug this morning...
:)

@andfoy
Copy link
Member

andfoy commented Jan 30, 2017

@ccordoba12 Is this an error related to external libraries? I can't even reproduce it by searching on a large directory

@goanpeca
Copy link
Member

@ccordoba12 Is this an error related to external libraries? I can't even reproduce it by searching on a large directory

I dont understand :-| ?

@andfoy
Copy link
Member

andfoy commented Jan 30, 2017

I can't reproduce the errors, as suggested by the users

@goanpeca
Copy link
Member

A thing that compounds this problem is that for buttons referring to regex etc on that widget, we have absolutely no clue if the button is pressed or not!

@ccordoba12
Copy link
Member

@andfoy, I can reproduce it. Please work on other things until we met in person and I show it in my computer :-)

@rachel-elas-ai
Copy link

rachel-elas-ai commented Feb 3, 2017

I have the same issue. It's been there ever since updating to 3.0.*. I can't get it to search for anything in files. All it says is "String not found" but there's no delay at all as if it's done any searching, not even when I know for a fact the string is present.

@ccordoba12
Copy link
Member

I think I found the problem: the search directory for Find in files was not synced with the one appearing in the Working directory toolbar at startup, and so the results of a search were taking place in a different directory.

I fixed that in PR #4144.

@ccordoba12
Copy link
Member

@nbonacchi, could you try the change I did to spyder/plugins/findinfiles.py in PR #4144 and let us know if it works for you? Thanks!

@ccordoba12
Copy link
Member

I hope PR #4144 fixes this problem. If not, please open a new issue after 3.1.3 is released :-)

ccordoba12 added a commit that referenced this issue Feb 15, 2017
@mherrmann3
Copy link

Nope, still not working in Spyder 3.1.3 on my Linux machine. No problems though on Windows (via conda).

@nbonacchi
Copy link
Author

nbonacchi commented Feb 23, 2017

confirmed, I just updated to 3.1.3 and problem still persists.
sorry couldn't look at it before...
should we still open a new issue?

@xoffey
Copy link

xoffey commented Mar 10, 2017

it actually crashes now in windows 10, 64-bit spyder 3.1.3. I am working with a small project (about a dozen .py files).

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

7 participants