Django 1.9: ImportError or AttributeError
See original GitHub issueWhen i do:
import pusher
p = pusher.Pusher
I get:
AttributeError: 'module' object has no attribute 'Pusher'
When i do:
from pusher import Pusher
p = Pusher
I get:
ImportError: cannot import name Pusher
Issue Analytics
- State:
- Created 8 years ago
- Comments:15 (6 by maintainers)
Top Results From Across the Web
Django 1.9 ImportError for import_module - Stack Overflow
The reason you can import it from django.utils.module_loading is that importlib.import_module is imported in that module, it is not because module_loading in ...
Read more >try/db.py", line 22, in __getattr__ ... - Google Groups
Hello,. I have been struggling to resolve this problem. I am following the setup -. http://django-oscar.readthedocs.io ...
Read more >Django Utils - Django documentation
This document covers all stable modules in django.utils . Most of the modules in django.utils are designed for internal use and only the...
Read more >Django 1.11: AttributeError: 'module' object has no attribute ...
Looking at the code and doing some basic testing, it seems enough to include 'AttributeError' in main.py as below - the instance runs...
Read more >Django: Compatibility Cheat Sheet - 2020 - BogoToBogo
_thread import get_ident # noqa try: from django.conf.urls import url, patterns, include, handler404, handler500 except ImportError: from ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It certainly looks like
pusher
is being overwritten by something else. Is there apusher.py
or apusher.pyc
in the same directory as your application? What happens when youprint(pusher)
after importing?My bad! Called my Django project pusher xD