Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PSYCHOPY Error: AttributeError: module 'logging' has no attribute 'getLogger'

I'm new to Python and Pscyhopy and whenever I try running an experiment, it gives me this error:

File
"/private/var/folders/nb/k9sz30gj29l_7d8l6tmbcxhr0000gn/T/AppTranslocation/F9CCC296-B2DF-4D05-A6AE-F9DE0928FE0E/d/PsychoPy3.app/Contents/Resources/lib/python3.6/lib2to3/pgen2/driver.py", line 120, in load_grammar
    logger = logging.getLogger()
AttributeError: module 'logging' has no attribute 'getLogger'

I already made sure that I don't have any files named logging.py but it still will not run. The demos run fine though.

like image 951
Durna Alakbarova Avatar asked Mar 15 '19 02:03

Durna Alakbarova


1 Answers

This type of problem occurs whenever there is circular import or any other logging module which don't have getLogger. Although you said you searched for any file naming logging.py but still i think your project has filename logging.py somewhere . If the current file you are working has name logging.py change it else it will give circular import error. Try searching for python library path if nothing works then only one option left is to change version Hope this helps..

like image 140
Abhishek Kuriyal Avatar answered Sep 28 '22 08:09

Abhishek Kuriyal