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

sphinx make html error:【WinError 5】 #5114

Closed
Sunnysky080 opened this issue Jun 21, 2018 · 2 comments
Closed

sphinx make html error:【WinError 5】 #5114

Sunnysky080 opened this issue Jun 21, 2018 · 2 comments

Comments

@Sunnysky080
Copy link

Sunnysky080 commented Jun 21, 2018

Subject: <cannot use the command make html with an WinError 5>

Problem

Running Sphinx v1.7.5
loading pickled environment... not yet created

Exception occurred:
  File "c:\program files\python36\lib\site-packages\sphinx\util\osutil.py", line 102, in walk
    names = os.listdir(top)
PermissionError: [WinError 5] 拒绝访问。: 'C:\\Users\\hp\\AppData\\Local\\Application Data'
The full traceback has been saved in C:\Users\hp\AppData\Local\Temp\sphinx-err-lxhm478i.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!
>

Procedure to reproduce the problem

make html

Error logs / results

# Sphinx version: 1.7.5
# Python version: 3.6.5 (CPython)
# Docutils version: 0.14 
# Jinja2 version: 2.10
# Last messages:

# Loaded extensions:
Traceback (most recent call last):
  File "c:\program files\python36\lib\site-packages\sphinx\application.py", line 282, in _init_env
    self.env = BuildEnvironment.frompickle(filename, self)
  File "c:\program files\python36\lib\site-packages\sphinx\environment\__init__.py", line 128, in frompickle
    with open(filename, 'rb') as f:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\hp\\_build\\doctrees\\environment.pickle'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\program files\python36\lib\site-packages\sphinx\cmdline.py", line 303, in main
    args.warningiserror, args.tags, args.verbosity, args.jobs)
  File "c:\program files\python36\lib\site-packages\sphinx\application.py", line 231, in __init__
    self._init_env(freshenv)
  File "c:\program files\python36\lib\site-packages\sphinx\application.py", line 293, in _init_env
    self._init_env(freshenv=True)
  File "c:\program files\python36\lib\site-packages\sphinx\application.py", line 275, in _init_env
    self.env.find_files(self.config, self.builder)
  File "c:\program files\python36\lib\site-packages\sphinx\environment\__init__.py", line 418, in find_files
    exclude_matchers=matchers):
  File "c:\program files\python36\lib\site-packages\sphinx\util\__init__.py", line 113, in get_matching_docs
    for filename in get_matching_files(dirname, exclude_matchers):
  File "c:\program files\python36\lib\site-packages\sphinx\util\__init__.py", line 88, in get_matching_files
    for root, dirs, files in walk(dirname, followlinks=True):
  File "c:\program files\python36\lib\site-packages\sphinx\util\osutil.py", line 123, in walk
    for x in walk(fullpath, topdown, followlinks):
  File "c:\program files\python36\lib\site-packages\sphinx\util\osutil.py", line 123, in walk
    for x in walk(fullpath, topdown, followlinks):
  File "c:\program files\python36\lib\site-packages\sphinx\util\osutil.py", line 123, in walk
    for x in walk(fullpath, topdown, followlinks):
  File "c:\program files\python36\lib\site-packages\sphinx\util\osutil.py", line 102, in walk
    names = os.listdir(top)
PermissionError: [WinError 5] 拒绝访问。: 'C:\\Users\\hp\\AppData\\Local\\Application Data'

Expected results

Reproducible project / your project

Environment info

  • OS: <windows 10 x64 with an upgrade 1803>
  • Python version:V3.6.5
  • Sphinx version:V1.7.5
  • <Extra tools e.g.: Browser, tex or something else>
@tk0miya
Copy link
Member

tk0miya commented Jun 21, 2018

  File "c:\program files\python36\lib\site-packages\sphinx\util\__init__.py", line 113, in get_matching_docs
    for filename in get_matching_files(dirname, exclude_matchers):
...
  File "c:\program files\python36\lib\site-packages\sphinx\util\osutil.py", line 102, in walk
    names = os.listdir(top)
PermissionError: [WinError 5] 拒绝访问。: 'C:\\Users\\hp\\AppData\\Local\\Application Data'

It seems PermissionError was raised on searching documents. Could you check your project directory?

@tk0miya
Copy link
Member

tk0miya commented Jul 16, 2018

I'm closing this because this is not a bug of Sphinx-core.
Thanks,

@tk0miya tk0miya closed this as completed Jul 16, 2018
tk0miya added a commit that referenced this issue Jul 17, 2018

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Handle OSError on scanning documents (refs: #5114)
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants