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

**URL:** <https://discourse.psychopy.org/t/attributeerror-module-object-has-no-attribute-getlogger/3122>\
**Category:** Coding\
**Created:** [September 27, 2017, 4:36am UTC](https://discourse.psychopy.org/t/attributeerror-module-object-has-no-attribute-getlogger/3122 "2017-09-27T04:36:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Iva28](https://avatars.discourse-cdn.com/v4/letter/i/cab0a1/32.png) [@Iva28](https://discourse.psychopy.org/u/Iva28)\
**Post date:** [September 27, 2017, 4:36am UTC](https://discourse.psychopy.org/t/attributeerror-module-object-has-no-attribute-getlogger/3122/1 "2017-09-27T04:36:59Z")

</div>

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?

```auto
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!

---

<div class="post-metadata">

**Author:** ![jon](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/jon/32/22_2.png) [@jon](https://discourse.psychopy.org/u/jon)\
**Post date:** [September 30, 2017, 1:41pm UTC](https://discourse.psychopy.org/t/attributeerror-module-object-has-no-attribute-getlogger/3122/2 "2017-09-30T13:41:34Z")

</div>

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](http://logging.py) next to [web.py](http://web.py) the script you’re running, but it isn’t the [logging.py](http://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?

---

<div class="post-metadata">

**Author:** ![Iva28](https://avatars.discourse-cdn.com/v4/letter/i/cab0a1/32.png) [@Iva28](https://discourse.psychopy.org/u/Iva28)\
**Post date:** [September 30, 2017, 5:45pm UTC](https://discourse.psychopy.org/t/attributeerror-module-object-has-no-attribute-getlogger/3122/3 "2017-09-30T17:45:55Z")

</div>

Hi Jon. I am trying to run [visual.py](http://visual.py) and [web.py](http://web.py) files forked from this [Github link](https://github.com/sloria/stimulus.py/tree/master/psychopy/psychopy).  
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](http://visual.py) , I get the following error:

```auto
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](http://web.py) I get this error:

```auto
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](http://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!
