AttributeError: module ‘logging‘ has no attribute ‘Handler‘

Traceback (most recent call last):
  File "/home/odoo/python-dev/python_interview_exercise/python_libs/0-pandas.py", line 3, in 
    import numpy
  File "/home/odoo/.local/lib/python3.6/site-packages/numpy/__init__.py", line 223, in 
    from .testing import Tester
  File "/home/odoo/.local/lib/python3.6/site-packages/numpy/testing/__init__.py", line 8, in 
    from unittest import TestCase
  File "/usr/lib/python3.6/unittest/__init__.py", line 59, in 
    from .case import (TestCase, FunctionTestCase, SkipTest, skip, skipIf,
  File "/usr/lib/python3.6/unittest/case.py", line 278, in 
    class _CapturingHandler(logging.Handler):
AttributeError: module 'logging' has no attribute 'Handler'

解决:
文件名字起了logging.py , 重新命名为其他名字,如demo_logging.py

你可能感兴趣的:(Python,python,pycharm)