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

FileNotFoundError in Online help #15847

Closed
Virinas-code opened this issue Jun 12, 2021 · 5 comments · Fixed by #15864
Closed

FileNotFoundError in Online help #15847

Virinas-code opened this issue Jun 12, 2021 · 5 comments · Fixed by #15864

Comments

@Virinas-code
Copy link
Contributor

Description

What steps will reproduce the problem?

  • Step 1 : Open Online help
  • Step 2 : Open Virinas-code/Crocrodile in package search bar and press

Error message

Python 3.7.3 [default, GCC 8.3.0]
Linux-4.19.0-16-amd64-x86_64-with-glibc2.28
Module Index : Topics : Keywords

Error
Virinas-code/Crocrodile.html
There was an error while retrieving documentation for the object you requested: Object could not be found

Traceback

  File "/usr/lib/python3.7/socketserver.py", line 316, in _handle_request_noblock
    self.process_request(request, client_address)
  File "/usr/lib/python3.7/socketserver.py", line 347, in process_request
    self.finish_request(request, client_address)
  File "/usr/lib/python3.7/socketserver.py", line 360, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python3.7/socketserver.py", line 720, in __init__
    self.handle()
  File "/usr/lib/python3.7/http/server.py", line 426, in handle
    self.handle_one_request()
  File "/usr/lib/python3.7/http/server.py", line 414, in handle_one_request
    method()
  File "/usr/local/lib/python3.7/dist-packages/spyder/plugins/onlinehelp/pydoc_patch.py", line 911, in do_GET
    self.path, content_type).encode('utf-8'))
  File "/usr/local/lib/python3.7/dist-packages/spyder/plugins/onlinehelp/pydoc_patch.py", line 867, in _url_handler
    with open(css_path) as fp:
FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/lib/python3.7/dist-packages/spyder/plugins/onlinehelp/Virinas-code/static/css/dark_pydoc.css'
----------------------------------------

Versions

  • Spyder version: 4.2.5
  • Python version: 3.7.3
  • Qt version: 5.12.10
  • PyQt5 version: 5.12.3
  • Operating System: Linux 4.19.0-16-amd64

Dependencies


# Mandatory:
atomicwrites >=1.2.0            :  1.4.0 (OK)
chardet >=2.0.0                 :  4.0.0 (OK)
cloudpickle >=0.5.0             :  1.6.0 (OK)
diff_match_patch >=20181111     :  20200713 (OK)
intervaltree >=3.0.2            :  3.1.0 (OK)
IPython >=7.6.0                 :  7.22.0 (OK)
jedi =0.17.2                    :  0.17.2 (OK)
jsonschema >=3.2.0              :  3.2.0 (OK)
keyring >=17.0.0                :  17.1.1 (OK)
nbconvert >=4.0                 :  None (NOK)
numpydoc >=0.6.0                :  1.1.0 (OK)
parso =0.7.0                    :  0.7.0 (OK)
pexpect >=4.4.0                 :  4.6.0 (OK)
pickleshare >=0.4               :  0.7.5 (OK)
psutil >=5.3                    :  5.8.0 (OK)
pygments >=2.0                  :  2.8.1 (OK)
pylint >=1.0                    :  2.7.4 (OK)
pyls >=0.36.2;<1.0.0            :  0.36.2 (OK)
pyls_black >=0.4.6              :  0.4.6 (OK)
pyls_spyder >=0.3.2             :  0.3.2 (OK)
qdarkstyle >=2.8;<3.0           :  2.8.1 (OK)
qtawesome >=0.5.7               :  1.0.2 (OK)
qtconsole >=5.0.3               :  5.0.3 (OK)
qtpy >=1.5.0                    :  1.9.0 (OK)
setuptools >=39.0.0             :  56.0.0 (OK)
sphinx >=0.6.6                  :  3.5.4 (OK)
spyder_kernels >=1.10.2;<1.11.0 :  1.10.3 (OK)
textdistance >=4.2.0            :  4.2.1 (OK)
three_merge >=0.1.1             :  0.1.1 (OK)
watchdog >=0.10.3;<2.0.0        :  1.0.2 (OK)
xdg >=0.26                      :  0.27 (OK)
zmq >=17                        :  17.1.2 (OK)

# Optional:
cython >=0.21                   :  None (NOK)
matplotlib >=2.0.0              :  3.4.1 (OK)
numpy >=1.7                     :  1.20.2 (OK)
pandas >=1.1.1                  :  None (NOK)
scipy >=0.17.0                  :  None (NOK)
sympy >=0.7.3                   :  None (NOK)

# Spyder plugins:
spyder_terminal                 :  0.5.0 (OK)
@Virinas-code Virinas-code changed the title FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/lib/python3.7/dist-packages/spyder/plugins/onlinehelp/Virinas-code/static/css/dark_pydoc.css' in Online help FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/lib/python3.7/dist-packages/spyder/plugins/onlinehelp/Virinas-code/static/css/dark_pydoc.css' in Online help (Spyder 4.2.5) Jun 12, 2021
@ccordoba12
Copy link
Member

Hey @Virinas-code, thanks for reporting. Did you add Virinas-code/Crocrodile to your PYTHONPATH or sys.path manually?

@Virinas-code
Copy link
Contributor Author

Hey @Virinas-code, thanks for reporting. Did you add Virinas-code/Crocrodile to your PYTHONPATH or sys.path manually?

No, I don't.

@ccordoba12
Copy link
Member

Then I don't understand how this error can appear. If you're able to reproduce it with a simple example, please let us know. Otherwise, it's not to possible for us to understand how to solve it,

@Virinas-code
Copy link
Contributor Author

I recently updated Spyder and now I've got Spyder 5. I can reproduce the bug on.
Do you want the complete traceback ?

@Virinas-code
Copy link
Contributor Author

Virinas-code commented Jun 14, 2021

I've got an idea :
https://github.com/spyder-ide/spyder/blob/master/spyder/plugins/onlinehelp/pydoc_patch.py#L642

            '<link rel="stylesheet" type="text/css" href="%s">' %

replace %s by /%s
I can't test it because i've got dependencies problems when building. Can you test it for me ?

@ccordoba12 ccordoba12 added this to the v5.1.0 milestone Jun 20, 2021
@ccordoba12 ccordoba12 changed the title FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/lib/python3.7/dist-packages/spyder/plugins/onlinehelp/Virinas-code/static/css/dark_pydoc.css' in Online help (Spyder 4.2.5) FileNotFoundError in Online help (Spyder 4.2.5) Jun 20, 2021
@ccordoba12 ccordoba12 changed the title FileNotFoundError in Online help (Spyder 4.2.5) FileNotFoundError in Online help Jun 20, 2021
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.

2 participants