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

Problems with six.moves.urllib #22

Closed
peterbe opened this issue Jun 24, 2014 · 1 comment
Closed

Problems with six.moves.urllib #22

peterbe opened this issue Jun 24, 2014 · 1 comment

Comments

@peterbe
Copy link
Contributor

peterbe commented Jun 24, 2014

On a fresh new python 2.7 virtualenv I installed silk and I got this:

Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/wsgiref/handlers.py", line 85, in run
    self.result = application(self.environ, self.start_response)
  File "/Users/peterbe/dev/MOZILLA/AIRMOZILLA/airmozilla/vendor/lib/python/django/contrib/staticfiles/handlers.py", line 72, in __call__
    return self.application(environ, start_response)
  File "/Users/peterbe/dev/MOZILLA/AIRMOZILLA/airmozilla/vendor/lib/python/django/core/handlers/wsgi.py", line 255, in __call__
    response = self.get_response(request)
  File "/Users/peterbe/dev/MOZILLA/AIRMOZILLA/airmozilla/vendor/lib/python/django/core/handlers/base.py", line 176, in get_response
    response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
  File "/Users/peterbe/dev/MOZILLA/AIRMOZILLA/airmozilla/vendor/lib/python/django/core/handlers/base.py", line 90, in get_response
    response = middleware_method(request)
  File "/Users/peterbe/virtualenvs/airmozilla2.7/lib/python2.7/site-packages/silk/middleware.py", line 70, in process_request
    if _should_intercept(request):
  File "/Users/peterbe/virtualenvs/airmozilla2.7/lib/python2.7/site-packages/silk/middleware.py", line 34, in _should_intercept
    fpath = silky_reverse('summary')
  File "/Users/peterbe/virtualenvs/airmozilla2.7/lib/python2.7/site-packages/silk/middleware.py", line 23, in silky_reverse
    r = reverse('silk:%s' % name, *args, **kwargs)
  File "/Users/peterbe/dev/MOZILLA/AIRMOZILLA/airmozilla/vendor/lib/python/django/core/urlresolvers.py", line 491, in reverse
    app_list = resolver.app_dict[ns]
  File "/Users/peterbe/dev/MOZILLA/AIRMOZILLA/airmozilla/vendor/lib/python/django/core/urlresolvers.py", line 330, in app_dict
    self._populate()
  File "/Users/peterbe/dev/MOZILLA/AIRMOZILLA/airmozilla/vendor/lib/python/django/core/urlresolvers.py", line 268, in _populate
    for pattern in reversed(self.url_patterns):
  File "/Users/peterbe/dev/MOZILLA/AIRMOZILLA/airmozilla/vendor/lib/python/django/core/urlresolvers.py", line 366, in url_patterns
    patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
  File "/Users/peterbe/dev/MOZILLA/AIRMOZILLA/airmozilla/vendor/lib/python/django/core/urlresolvers.py", line 361, in urlconf_module
    self._urlconf_module = import_module(self.urlconf_name)
  File "/Users/peterbe/dev/MOZILLA/AIRMOZILLA/airmozilla/vendor/lib/python/django/utils/importlib.py", line 35, in import_module
    __import__(name)
  File "/Users/peterbe/dev/MOZILLA/AIRMOZILLA/airmozilla/airmozilla/urls.py", line 38, in <module>
    urlpatterns += patterns('', url(r'^silk', include('silk.urls', namespace='silk')))
  File "/Users/peterbe/dev/MOZILLA/AIRMOZILLA/airmozilla/vendor/lib/python/django/conf/urls/__init__.py", line 25, in include
    urlconf_module = import_module(urlconf_module)
  File "/Users/peterbe/dev/MOZILLA/AIRMOZILLA/airmozilla/vendor/lib/python/django/utils/importlib.py", line 35, in import_module
    __import__(name)
  File "/Users/peterbe/virtualenvs/airmozilla2.7/lib/python2.7/site-packages/silk/urls.py", line 3, in <module>
    from silk.views.profile_detail import ProfilingDetailView
  File "/Users/peterbe/virtualenvs/airmozilla2.7/lib/python2.7/site-packages/silk/views/profile_detail.py", line 4, in <module>
    from silk.auth import login_possibly_required, permissions_possibly_required
  File "/Users/peterbe/virtualenvs/airmozilla2.7/lib/python2.7/site-packages/silk/auth.py", line 12, in <module>
    from six.moves.urllib.parse import urlparse
ImportError: No module named urllib.parse

I tried pip install -U six which then installed six==1.7.2 but that didn't help :(

@peterbe
Copy link
Contributor Author

peterbe commented Jun 24, 2014

My bad, I had six installed into a vendor library which is included in the project and loaded first in sys.path so now I had six installed in the virtualenv and in ./vendor-local/lib/python and that one was version 1.1.

@peterbe peterbe closed this as completed Jun 24, 2014
pablodiazgutierrez pushed a commit to appfluence/django-silk that referenced this issue Oct 18, 2020
* Add regression tests for jazzband#22

* Handle more complicated PATCH calls
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant