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

Hi,

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/stimulus.py-master/psychopy/psychopy/web.py", line 16, in <module>
    from psychopy import logging
  File "/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/psychopy/__init__.py", line 43, in <module>
    from psychopy.preferences import prefs
  File "/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/psychopy/preferences/__init__.py", line 8, in <module>
    from . import preferences as prefsLib
  File "/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/psychopy/preferences/preferences.py", line 4, in <module>
    from builtins import object
  File "builtins/__init__.pyc", line 8, in <module>
  File "/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/future/builtins/__init__.py", line 10, in <module>
    from future.builtins.iterators import (filter, map, zip)
  File "/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/future/builtins/iterators.py", line 43, in <module>
    from future.types import newrange as range
  File "/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/future/types/__init__.py", line 243, in <module>
    from .newrange import newrange
  File "/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/future/types/newrange.py", line 25, in <module>
    from future.backports.misc import count   # with step parameter on Py2.6
  File "/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/future/backports/__init__.py", line 10, in <module>
    from future.standard_library import import_top_level_modules
  File "/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/future/standard_library/__init__.py", 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 web.py file like it was a script?

This is confusing Python because it’s finding something called logging.py next to web.py the script you’re running, but it isn’t the logging.py 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 visual.py and web.py 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 visual.py , I get the following error:

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

And running web.py I get this error:

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

I assume running web.py 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.

Thanks!