[issue42119] Error when debugging logging.FileHandler subclass __init__ method
Andrei Kulakov
report at bugs.python.org
Wed Jul 28 22:27:14 EDT 2021
Andrei Kulakov <andrei.avk at gmail.com> added the comment:
Françoise:
You can simply set the two attrs required by __repr__ in the pdb session:
./python.exe ~/temp/a.py --INS--
> /Users/ak/opensource/cpython/Lib/logging/__init__.py(1152)__init__()
-> filename = os.fspath(filename)
(Pdb) self.level=1
(Pdb) self.baseFilename='test.log'
(Pdb) a
self = <FileHandler test.log (Level 1)>
filename = 'test.log'
mode = 'a'
encoding = None
delay = False
errors = None
(Pdb)
I think this can be closed as it's not a bug and there's a workaround as shown above.
----------
nosy: +andrei.avk
versions: +Python 3.10, Python 3.11, Python 3.9
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42119>
_______________________________________
More information about the Python-bugs-list
mailing list