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

Error copying directory to _static in Sphinx #48331

Closed
tcdelaney mannequin opened this issue Oct 8, 2008 · 5 comments
Closed

Error copying directory to _static in Sphinx #48331

tcdelaney mannequin opened this issue Oct 8, 2008 · 5 comments
Assignees
Labels
docs Documentation in the Doc dir type-crash A hard crash of the interpreter, possibly with a core dump

Comments

@tcdelaney
Copy link
Mannequin

tcdelaney mannequin commented Oct 8, 2008

BPO 4081
Nosy @birkenfeld
Files
  • sphinx_static_exc.txt: Stack trace
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/birkenfeld'
    closed_at = <Date 2008-10-18.20:55:26.622>
    created_at = <Date 2008-10-08.22:28:35.248>
    labels = ['type-crash', 'docs']
    title = 'Error copying directory to _static in Sphinx'
    updated_at = <Date 2008-10-18.20:55:26.620>
    user = 'https://bugs.python.org/tcdelaney'

    bugs.python.org fields:

    activity = <Date 2008-10-18.20:55:26.620>
    actor = 'georg.brandl'
    assignee = 'georg.brandl'
    closed = True
    closed_date = <Date 2008-10-18.20:55:26.622>
    closer = 'georg.brandl'
    components = ['Documentation tools (Sphinx)']
    creation = <Date 2008-10-08.22:28:35.248>
    creator = 'tcdelaney'
    dependencies = []
    files = ['11752']
    hgrepos = []
    issue_num = 4081
    keywords = []
    message_count = 5.0
    messages = ['74551', '74552', '74956', '74957', '74959']
    nosy_count = 2.0
    nosy_names = ['georg.brandl', 'tcdelaney']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = None
    status = 'closed'
    superseder = None
    type = 'crash'
    url = 'https://bugs.python.org/issue4081'
    versions = []

    @tcdelaney
    Copy link
    Mannequin Author

    tcdelaney mannequin commented Oct 8, 2008

    If there is a directory to be copied to _static, Sphinx first attempts
    to delete any directory by the same name in the _static directory. See
    attached sphinx_static_exc.txt for the exception.

    The simplest fix is to change the call (line 595, Sphinx 0.4.2) to::

        shutil.rmtree(targetname)

    to::

        shutil.rmtree(targetname, ignore_errors=True)

    It would also be preferable if instead of blindly doing rmtree/copytree,
    only updated files be copied to _static.

    @tcdelaney tcdelaney mannequin assigned birkenfeld Oct 8, 2008
    @tcdelaney tcdelaney mannequin added docs Documentation in the Doc dir type-crash A hard crash of the interpreter, possibly with a core dump labels Oct 8, 2008
    @tcdelaney
    Copy link
    Mannequin Author

    tcdelaney mannequin commented Oct 8, 2008

    Oops - didn't complete my thought. The issue is that if the directory
    does not already exist, the attached exception is raised.

    @birkenfeld
    Copy link
    Member

    But there is a "path.exists()" condition around the rmtree, isn't there?

    @tcdelaney
    Copy link
    Mannequin Author

    tcdelaney mannequin commented Oct 18, 2008

    Confirmed fixed in 0.43 - this issue can be closed.

    @birkenfeld
    Copy link
    Member

    Great! Thanks for the patience.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    docs Documentation in the Doc dir type-crash A hard crash of the interpreter, possibly with a core dump
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant