Skip to content

TimedRotatingFileHandler crashes on backup file deletion attempt #47178

Closed

Description

@blocki
mannequin
BPO 2929
Nosy @vsajip

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/vsajip'
closed_at = <Date 2008-05-20.15:43:08.795>
created_at = <Date 2008-05-20.12:34:09.194>
labels = ['library', 'type-crash']
title = 'TimedRotatingFileHandler crashes on backup file deletion attempt'
updated_at = <Date 2008-05-20.15:43:08.794>
user = 'https://bugs.python.org/blocki'

bugs.python.org fields:

activity = <Date 2008-05-20.15:43:08.794>
actor = 'vinay.sajip'
assignee = 'vinay.sajip'
closed = True
closed_date = <Date 2008-05-20.15:43:08.795>
closer = 'vinay.sajip'
components = ['Library (Lib)']
creation = <Date 2008-05-20.12:34:09.194>
creator = 'blocki'
dependencies = []
files = []
hgrepos = []
issue_num = 2929
keywords = []
message_count = 2.0
messages = ['67125', '67131']
nosy_count = 2.0
nosy_names = ['vinay.sajip', 'blocki']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = None
status = 'closed'
superseder = None
type = 'crash'
url = 'https://bugs.python.org/issue2929'
versions = ['Python 2.5']

Activity

  1. blocki commented on May 20, 2008

    blockimannequin
    MannequinAuthor

    Hello,
    when the maximum number of backup files is reached
    TimedRotatingFileHandler can't delete the oldest existing file. I got
    the following error message:

    Traceback (most recent call last):
      File "D:\Python25\lib\logging\handlers.py", line 75, in emit
        self.doRollover()
      File "D:\Python25\lib\logging\handlers.py", line 319, in doRollover
        os.remove(s)
    WindowsError: [Error 2] The system cannot find the file specified:
    'assyst.log.2008-05-20_12-49'

    The reason for this error is located in the getFilesToDelete method of
    the TimedRotatingFileHandler class. The result sequence of this method
    contains filenames but a complete filepath is needed.

    After replacing
    result.append(fileName)
    with
    result.append(os.path.join(dirName, fileName))
    the problem seems to be solved

    Regards
    Stephan

  2. added
    stdlibStandard Library Python modules in the Lib/ directory
    type-crashA hard crash of the interpreter, possibly with a core dump
    on May 20, 2008
  3. vsajip commented on May 20, 2008

    @vsajip
    Member

    Fix checked into trunk (r63507). Thanks for the report!

  4. transferred this issue fromon Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

stdlibStandard Library Python modules in the Lib/ directorytype-crashA hard crash of the interpreter, possibly with a core dump

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions