AttributeError: 'Modul' Objekt hat kein Attribut 'getLogger'

Post a reply

Smilies
:) :( :oops: :chelo: :roll: :wink: :muza: :sorry: :angel: :read: *x) :clever:
View more smilies

BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: AttributeError: 'Modul' Objekt hat kein Attribut 'getLogger'

by Anonymous » 27 Jan 2025, 10:45

Beim Versuch, ein Logger-Objekt vom Python-Protokollierungsmodul abzurufen:

Code: Select all

logging.basicConfig()
logger = logging.getlogger("logger")
logger.setLevel(logging.DEBUG)
logger.propagate = True
< /code>

Ich habe den folgenden Fehler begegnet: < /p>

Traceback (most recent call last):
File "tools/train_net_step.py", line 22, in 
import utils.net as net_utils
File ~/lib/utils/net.py", line 12, in 
logger = logging.getlogger(__name__)
AttributeError: 'module' object has no attribute 'getlogger'

Top