Skip to content
New issue

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

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

Already on GitHub? # to your account

rollbar 0.13.7 incompatible with Django 1.9.x #140

Closed
wli opened this issue Oct 27, 2016 · 3 comments
Closed

rollbar 0.13.7 incompatible with Django 1.9.x #140

wli opened this issue Oct 27, 2016 · 3 comments

Comments

@wli
Copy link

wli commented Oct 27, 2016

Original issue: #127
PR that introduced the incompatibility: #138

I suspect the line just needs to be changed from from utils import MiddlewareMixin to from .utils import MiddlewareMixin

======================================================================
ERROR: test_index (base.tests.IndexViewTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/ubuntu/virtualenvs/venv-3.5.1/lib/python3.5/site-packages/rollbar/contrib/django/middleware.py", line 27, in <module>
    from django.utils.deprecation import MiddlewareMixin
ImportError: cannot import name 'MiddlewareMixin'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/ubuntu/sparks-web/base/tests.py", line 23, in test_index
    response = self.client.get('/')
  File "/home/ubuntu/virtualenvs/venv-3.5.1/lib/python3.5/site-packages/django/test/client.py", line 503, in get
    **extra)
  File "/home/ubuntu/virtualenvs/venv-3.5.1/lib/python3.5/site-packages/django/test/client.py", line 304, in get
    return self.generic('GET', path, secure=secure, **r)
  File "/home/ubuntu/virtualenvs/venv-3.5.1/lib/python3.5/site-packages/django/test/client.py", line 380, in generic
    return self.request(**r)
  File "/home/ubuntu/virtualenvs/venv-3.5.1/lib/python3.5/site-packages/django/test/client.py", line 449, in request
    response = self.handler(environ)
  File "/home/ubuntu/virtualenvs/venv-3.5.1/lib/python3.5/site-packages/django/test/client.py", line 110, in __call__
    self.load_middleware()
  File "/home/ubuntu/virtualenvs/venv-3.5.1/lib/python3.5/site-packages/django/core/handlers/base.py", line 51, in load_middleware
    mw_class = import_string(middleware_path)
  File "/home/ubuntu/virtualenvs/venv-3.5.1/lib/python3.5/site-packages/django/utils/module_loading.py", line 20, in import_string
    module = import_module(module_path)
  File "/opt/circleci/python/3.5.1/lib/python3.5/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 986, in _gcd_import
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 662, in exec_module
  File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
  File "/home/ubuntu/virtualenvs/venv-3.5.1/lib/python3.5/site-packages/rollbar/contrib/django/middleware.py", line 29, in <module>
    from utils import MiddlewareMixin
ImportError: No module named 'utils'
@ezarowny
Copy link
Contributor

Ah, my bad. I will fix this momentarily.

@ezarowny
Copy link
Contributor

ezarowny commented Oct 27, 2016

#141 is up now. It'd be cool if you could try it out. It's working for me in Django 1.9.X and 1.10.X in Python 2 and Python 3.

@ezarowny
Copy link
Contributor

Alright, v0.13.8 is up on PyPI! Sorry about that bug!

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

No branches or pull requests

2 participants