-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Labels
help wanted 🙏We need you (discussion or implementation)We need you (discussion or implementation)synchronisation ⇶Multi-thread/processingMulti-thread/processing
Description
I am using my own stream handler as suggested in [1] to use tqdm with a logger.
class TqdmHandler(logging.StreamHandler):
def __init__(self):
logging.StreamHandler.__init__(self)
def emit(self, record):
msg = self.format(record)
tqdm.write(msg)
The code crashes in some cases with "AttributeError: 'tqdm' object has no attribute ' when the tqdm.write(msg)
command is issued. The culprit of the error is here: one of the elements in _instances
has no attribute fp
.
From what I can tell an instance object with no fp
attribute is created by the __new__
method. Could it be the problem?
Metadata
Metadata
Assignees
Labels
help wanted 🙏We need you (discussion or implementation)We need you (discussion or implementation)synchronisation ⇶Multi-thread/processingMulti-thread/processing