Frank GOENNINGER <[email protected]> wrote:
>
> When trying to execute main() I get:
>
> Traceback (most recent call last):
> File "/.../src/pib/logging.py", line 37, in <module>
> main()
> File "/.../src/pib/logging.py", line 33, in main
> mylogger = PIBLogger('/tmp/pib.log')
> File "/...src/pib/logging.py", line 23, in __init__
> self.logger = logging.getLogger('PIBLogger')
> AttributeError: 'module' object has no attribute 'getLogger'
>
> I double checked and yes, getLogger is there. Why is the interpreter
> asking for an "attribute" here ? Any hints on what I am doing wrong ?
>
You're source file appears to be called logging.py, so when you do 'import
logging' it just imports itself. The system logging.py has a getLogger
function, but *your* logging.py doesn't.
--
http://mail.python.org/mailman/listinfo/python-list