Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pandas: AttributeError: 'module' object has no attribute 'getLogger'

How do I fix this? I want to use the Panda module, do I need to rename certain files?

When trying to import pandas, I get these errors:

Traceback (most recent call last):
  File "C:\Users\Mathias\Documents\Cognitive Science\Cognition and Communication\Exam project\Embodiment_Exp.py", line 11, in <module>
    import pandas as pd
  File "C:\Python27\lib\site-packages\pandas\__init__.py", line 44, in <module>
    from pandas.io.api import *
  File "C:\Python27\lib\site-packages\pandas\io\api.py", line 15, in <module>
    from pandas.io.gbq import read_gbq
  File "C:\Python27\lib\site-packages\pandas\io\gbq.py", line 37, in <module>
AttributeError: 'module' object has no attribute 'getLogger'
like image 561
Mathias Andersen Avatar asked Dec 11 '16 01:12

Mathias Andersen


1 Answers

This is to do with a filename clash, see https://github.com/pandas-dev/pandas/issues/10167

If you have a file named logging.py this needs to be renamed.

like image 145
Samizdis Avatar answered Oct 13 '22 12:10

Samizdis