| Reference | Downloads | Github

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


Can anyone help me to know why this kind of error is coming? Is it because I need to update some Psychopy package ? Or is it related to specific file?

Traceback (most recent call last):
  File "/Users/divz/Sachin/", line 16, in <module>
    from psychopy import logging
  File "/Applications/", line 43, in <module>
    from psychopy.preferences import prefs
  File "/Applications/", line 8, in <module>
    from . import preferences as prefsLib
  File "/Applications/", line 4, in <module>
    from builtins import object
  File "builtins/__init__.pyc", line 8, in <module>
  File "/Applications/", line 10, in <module>
    from future.builtins.iterators import (filter, map, zip)
  File "/Applications/", line 43, in <module>
    from future.types import newrange as range
  File "/Applications/", line 243, in <module>
    from .newrange import newrange
  File "/Applications/", line 25, in <module>
    from future.backports.misc import count   # with step parameter on Py2.6
  File "/Applications/", line 10, in <module>
    from future.standard_library import import_top_level_modules
  File "/Applications/", line 73, in <module>
    flog = logging.getLogger('future_stdlib')
AttributeError: 'module' object has no attribute 'getLogger'

Please help me to resolve this error. Thanks in advance!

It looks to me like you’ve taken the psychopy library outside the application and you’re trying to run the file like it was a script?

This is confusing Python because it’s finding something called next to the script you’re running, but it isn’t the that is expected by another lib.

You shouldn’t need to drag psychopy files outside the application (and you should only do so when you’re quite comfortable with Python programming). You should never need to run a PsychoPy script itself. They are designed to be imported by your own script and then used.

What are you trying to do?

Hi Jon. I am trying to run and files forked from this Github link.
I am running the files from Terminal on my Mac Os from its respective folder. I haven’t pulled any files outside.
While running , I get the following error:

Traceback (most recent call last):
  File "", line 28, in <module>
    import colors
  File "/Users/divz/Documents/", line 1, in <module>
    from psychopy.misc import dkl2rgb, lms2rgb, hsv2rgb
  File "/usr/local/lib/python2.7/site-packages/psychopy/", line 30, in <module>
    from import array2image, image2array, makeImageAuto
  File "/usr/local/lib/python2.7/site-packages/psychopy/tools/", line 10, in <module>
    from PIL import Image
  File "/usr/local/lib/python2.7/site-packages/PIL/", line 33, in <module>
    logger = logging.getLogger(__name__)
AttributeError: 'module' object has no attribute 'getLogger'

And running I get this error:

setup proxy took 0.22s
0.2546 	DEBUG 	Using standard urllib2 (static proxy or no proxy required)
0.3070 	INFO 	upload: host extracted from selector =
0.3071 	EXP 	upload: uploading file /tmp/tmpDuCghG/test.txt to
0.4626 	ERROR 	upload: -1 connection error (possible timeout after 20.0s)
Traceback (most recent call last):
  File "", line 499, in <module>
  File "", line 481, in _test_upload
    bytes = _upload(msg) #normal text
  File "", line 473, in _upload
    assert good_upload # remote server FAILED to report success

I assume running will help me to navigate to a web page. If so, I am trying to create a stimuli in Psychopy which on selection, will navigate to web page.