Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'module' object has no attribute 'NullHandler' #54

Closed
davidawad opened this issue Apr 19, 2015 · 6 comments
Closed

AttributeError: 'module' object has no attribute 'NullHandler' #54

davidawad opened this issue Apr 19, 2015 · 6 comments
Labels

Comments

@davidawad
Copy link

Sorry, just never had the chance to comment / post the version. 2013 macbook air, newest osx. Let me know if you need anything else. Thanks!

python --version
Python 2.7.9
python server.py
Traceback (most recent call last):
  File "server.py", line 8, in <module>
    from TwitterAPI import TwitterAPI
  File "/Library/Python/2.7/site-packages/TwitterAPI/__init__.py", line 12, in <module>
    logging.getLogger(__name__).addHandler(logging.NullHandler())
AttributeError: 'module' object has no attribute 'NullHandler'
@geduldig
Copy link
Owner

I need a short code sample that produces this error.

@davidawad
Copy link
Author

It's just importing the api. for some reason that causes the error. It's possible it's being caused by a buggy python installation? I'm not sure as I'm not getting any other problems with other packages.

@geduldig
Copy link
Owner

As I said in Issue #53, I tried and could not reproduce your error. You probably are doing more than "just importing the api" if your traceback points to line 8 of your code. You can either send me a short sample, or try running a python script with just the one line of code from TwitterAPI import TwitterAPI and see if you still get an error.

@geduldig
Copy link
Owner

One more thing. I have an older mac that came with an older version of Python 2.7. When I installed Python 2.7.9 my path still pointed to the older version. I had to modify my PATH environment variable to point to the new version. I don't think you are having this issue since you said when you ran python --version it outputted 2.7.9. But, I may be just confusing the issue since all 2.7 versions of python include NullHandler.

@geduldig
Copy link
Owner

If you want to post your sample code, please reopen this issue thread. You don't need to open a new issue.

Thanks, Jonas

@geduldig
Copy link
Owner

I don't know if you figured out your issue. In issue #56, someone reported a similar problem as you. In his case, he was using an IDE which with a path to an older version of Python.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants