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

Avoid errors when doing migrate command #86

Merged
merged 1 commit into from
Jan 11, 2019
Merged

Conversation

msaelices
Copy link
Contributor

This is my traceback:

python manage.py migrate
Traceback (most recent call last):
  File "/home/ubuntu/webapps/smith/manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/home/ubuntu/venvs/agentsmith/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 354, in execute_from_command_line
    utility.execute()
  File "/home/ubuntu/venvs/agentsmith/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 328, in execute
    django.setup()
  File "/home/ubuntu/venvs/agentsmith/local/lib/python2.7/site-packages/django/__init__.py", line 18, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/home/ubuntu/venvs/agentsmith/local/lib/python2.7/site-packages/django/apps/registry.py", line 115, in populate
    app_config.ready()
  File "/home/ubuntu/venvs/agentsmith/local/lib/python2.7/site-packages/debug_toolbar/apps.py", line 16, in ready
    dt_settings.check_middleware()
  File "/home/ubuntu/venvs/agentsmith/local/lib/python2.7/site-packages/debug_toolbar/settings.py", line 165, in check_middleware
    if is_middleware_class(GZipMiddleware, middleware):
  File "/home/ubuntu/venvs/agentsmith/local/lib/python2.7/site-packages/debug_toolbar/settings.py", line 182, in is_middleware_class
    mod = import_module(mod_path)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/home/ubuntu/venvs/agentsmith/local/lib/python2.7/site-packages/silk/middleware.py", line 31, in <module>
    fpath = silky_reverse('summary')
  File "/home/ubuntu/venvs/agentsmith/local/lib/python2.7/site-packages/silk/middleware.py", line 27, in silky_reverse
    r = reverse(name, *args, **kwargs)
  File "/home/ubuntu/venvs/agentsmith/local/lib/python2.7/site-packages/django/core/urlresolvers.py", line 578, in reverse
    return force_text(iri_to_uri(resolver._reverse_with_prefix(view, prefix, *args, **kwargs)))
  File "/home/ubuntu/venvs/agentsmith/local/lib/python2.7/site-packages/django/core/urlresolvers.py", line 495, in _reverse_with_prefix
    (lookup_view_s, args, kwargs, len(patterns), patterns))
django.core.urlresolvers.NoReverseMatch: Reverse for 'summary' with arguments '()' and keyword arguments '{}' not found. 0 pattern(s) tried: []

@avelis
Copy link
Collaborator

avelis commented Dec 1, 2015

@msaelices Do you know what version of Django this is happening on specifically?

This error leads me to believe you have and issue with not defining silk URL's with it's own namespace. See:
https://github.com/django-silk/silk/blame/master/README.md#L62

@msaelices
Copy link
Contributor Author

I'm using Django 1.8.5 and I correctly added the URL with the silky namespace.

@calebpsdinc
Copy link

I've spent hours debugging an issue, only to find the url configuration for silk is required. This PR prevents my entire site from crashing due to silk not having the URLs configured, so 👍

@avelis avelis merged commit 0384cfd into jazzband:master Jan 11, 2019
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

Successfully merging this pull request may close these issues.

4 participants