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

TypeError after clicking "Find in files" action #21538

Closed
popovs opened this issue Nov 17, 2023 · 3 comments · Fixed by #21622
Closed

TypeError after clicking "Find in files" action #21538

popovs opened this issue Nov 17, 2023 · 3 comments · Fixed by #21622

Comments

@popovs
Copy link

popovs commented Nov 17, 2023

Description

What steps will reproduce the problem?

Tried to open "Find in files". The textbox to search in files was already filled with the last line of code I ran in the console for some reason.

Traceback

Traceback (most recent call last):
  File "/Applications/Spyder.app/Contents/Resources/lib/python3.9/spyder/plugins/findinfiles/widgets/search_thread.py", line 101, in run
  File "/Applications/Spyder.app/Contents/Resources/lib/python3.9/spyder/plugins/findinfiles/widgets/search_thread.py", line 119, in find_files_in_path
  File "os.pyc", line 342, in walk
TypeError: expected str, bytes or os.PathLike object, not NoneType

Versions

  • Spyder version: 5.5.0 b4c4e1a (standalone)
  • Python version: 3.9.14 64-bit
  • Qt version: 5.15.11
  • PyQt5 version: 5.15.10
  • Operating System: macOS-13.5.2-x86_64-i386-64bit

Dependencies

# Mandatory:
atomicwrites >=1.2.0             :  1.4.1 (OK)
chardet >=2.0.0                  :  5.2.0 (OK)
cloudpickle >=0.5.0              :  3.0.0 (OK)
cookiecutter >=1.6.0             :  2.4.0 (OK)
diff_match_patch >=20181111      :  20230430 (OK)
intervaltree >=3.0.2             :  3.1.0 (OK)
IPython >=8.13.0,<9.0.0,!=8.17.1 :  8.17.2 (OK)
jedi >=0.17.2,<0.20.0            :  0.19.1 (OK)
jellyfish >=0.7                  :  1.0.1 (OK)
jsonschema >=3.2.0               :  4.19.2 (OK)
keyring >=17.0.0                 :  24.2.0 (OK)
nbconvert >=4.0                  :  7.11.0 (OK)
numpydoc >=0.6.0                 :  1.6.0 (OK)
parso >=0.7.0,<0.9.0             :  0.8.3 (OK)
pexpect >=4.4.0                  :  4.8.0 (OK)
pickleshare >=0.4                :  0.7.5 (OK)
psutil >=5.3                     :  5.9.6 (OK)
pygments >=2.0                   :  2.16.1 (OK)
pylint >=2.5.0,<3.1              :  3.0.2 (OK)
pylint_venv >=3.0.2              :  None (OK)
pyls_spyder >=0.4.0              :  0.4.0 (OK)
pylsp >=1.9.0,<1.10.0            :  1.9.0 (OK)
pylsp_black >=1.2.0,<3.0.0       :  1.3.0 (OK)
qdarkstyle >=3.2.0,<3.3.0        :  3.2 (OK)
qstylizer >=0.2.2                :  0.2.2 (OK)
qtawesome >=1.2.1                :  1.2.3 (OK)
qtconsole >=5.5.0,<5.6.0         :  5.5.0 (OK)
qtpy >=2.1.0                     :  2.4.1 (OK)
rtree >=0.9.7                    :  1.1.0 (OK)
setuptools >=49.6.0              :  68.2.2 (OK)
sphinx >=0.6.6                   :  5.1.1 (OK)
spyder_kernels >=2.5.0,<2.6.0    :  2.5.0 (OK)
textdistance >=4.2.0             :  4.6.0 (OK)
three_merge >=0.1.1              :  0.1.1 (OK)
watchdog >=0.10.3                :  3.0.0 (OK)
zmq >=22.1.0                     :  25.1.1 (OK)

# Optional:
cython >=0.21                    :  3.0.5 (OK)
matplotlib >=3.0.0               :  3.8.1 (OK)
numpy >=1.7                      :  1.26.1 (OK)
pandas >=1.1.1                   :  2.1.2 (OK)
scipy >=0.17.0                   :  1.11.3 (OK)
sympy >=0.7.3                    :  1.12 (OK)
@GitKia1392
Copy link

Tried to open "Find in files". The textbox to search in files was already filled with the last line of code I ran in the console for some reason.

Solution

OK so first try to set Spyder to factory defaults.
Then RE-install if not work
run cmd.exe as admin and type
sfc /scannow
reboot spyder
if not work try:
DISM /Online /Cleanup-Image /RestoreHealth --> might wanna try to do DISM /Online /Cleanup-Image /CheckHealth first.

If none work tell me

Thx
Kiamehr Esk

@ccordoba12
Copy link
Member

Hey @popovs, thanks for reporting. I don't understand very well how this error can be generated. If possible, could you post a screenshot of the current options you have in the Find pane that lead to this error?

If that's not possible, don't worry. We'll find a way to prevent it in Spyder 6, to be released during the first quarter of next year.

@GitKia1392
Copy link

I think this issue should be closed as repo or normal now.

Thanks

@ccordoba12 ccordoba12 modified the milestones: v6.0alpha3, v6.0beta1 Dec 1, 2023
@ccordoba12 ccordoba12 changed the title Issue reporter pops up after clicking "find in files" TypeError after clicking "Find in files" action Dec 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants