Monday, April 1, 2019

Re: Must be my and and can't be my code -- tracing back a URL pattern type mismatch

I do in fact use Django Debug Toolbar.

On Mon, Apr 1, 2019 at 9:19 AM nm <natalia.maniakowska.skygate@gmail.com> wrote:
Do you use any additional packages like e.g. Django Debug Toolbar? Or anything else that could mess with your urls? This is just a wild guess, but since nobody has answered with a better idea yet...

On Sunday, 31 March 2019 04:31:42 UTC+2, Josh Marshall wrote:
I'm helping out on a project, but am running into a paradox of a bug must existing in the code, but no project code is called.  Not sure how to deal with this one.  It looks related to URL setup and the urls.py file is practically identical to the examples.  Can anyone make sense of this stack trace?


```
[anadon@goodadvicemallard project1]$ poetry run ./manage.py check
/home/anadon/.cache/pypoetry/virtualenvs/project1-N4OQNeyl-py3.6/lib/python3.6/site-packages/psycopg2/__init__.py:144: UserWarning: The psycopg2 wheel package will be renamed from release 2.8; in order to keep installing from binary please use "pip install psycopg2-binary" instead. For details see: <http://initd.org/psycopg/docs/install.html#binary-install-from-pypi>.
  """)
Auto generated 7 views for endpoints
Traceback (most recent call last):
  File "./manage.py", line 28, in <module>
    execute_from_command_line(sys.argv)
  File "/home/anadon/.cache/pypoetry/virtualenvs/project1-N4OQNeyl-py3.6/lib/python3.6/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
    utility.execute()
  File "/home/anadon/.cache/pypoetry/virtualenvs/project1-N4OQNeyl-py3.6/lib/python3.6/site-packages/django/core/management/__init__.py", line 375, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/anadon/.cache/pypoetry/virtualenvs/project1-N4OQNeyl-py3.6/lib/python3.6/site-packages/django/core/management/base.py", line 316, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/home/anadon/.cache/pypoetry/virtualenvs/project1-N4OQNeyl-py3.6/lib/python3.6/site-packages/django/core/management/base.py", line 353, in execute
    output = self.handle(*args, **options)
  File "/home/anadon/.cache/pypoetry/virtualenvs/project1-N4OQNeyl-py3.6/lib/python3.6/site-packages/django/core/management/commands/check.py", line 65, in handle
    fail_level=getattr(checks, options['fail_level']),
  File "/home/anadon/.cache/pypoetry/virtualenvs/project1-N4OQNeyl-py3.6/lib/python3.6/site-packages/django/core/management/base.py", line 379, in check
    include_deployment_checks=include_deployment_checks,
  File "/home/anadon/.cache/pypoetry/virtualenvs/project1-N4OQNeyl-py3.6/lib/python3.6/site-packages/django/core/management/base.py", line 366, in _run_checks
    return checks.run_checks(**kwargs)
  File "/home/anadon/.cache/pypoetry/virtualenvs/project1-N4OQNeyl-py3.6/lib/python3.6/site-packages/django/core/checks/registry.py", line 71, in run_checks
    new_errors = check(app_configs=app_configs)
  File "/home/anadon/.cache/pypoetry/virtualenvs/project1-N4OQNeyl-py3.6/lib/python3.6/site-packages/django/core/checks/urls.py", line 13, in check_url_config
    return check_resolver(resolver)
  File "/home/anadon/.cache/pypoetry/virtualenvs/project1-N4OQNeyl-py3.6/lib/python3.6/site-packages/django/core/checks/urls.py", line 23, in check_resolver
    return check_method()
  File "/home/anadon/.cache/pypoetry/virtualenvs/project1-N4OQNeyl-py3.6/lib/python3.6/site-packages/django/urls/resolvers.py", line 397, in check
    warnings.extend(check_resolver(pattern))
  File "/home/anadon/.cache/pypoetry/virtualenvs/project1-N4OQNeyl-py3.6/lib/python3.6/site-packages/django/core/checks/urls.py", line 23, in check_resolver
    return check_method()
  File "/home/anadon/.cache/pypoetry/virtualenvs/project1-N4OQNeyl-py3.6/lib/python3.6/site-packages/django/urls/resolvers.py", line 397, in check
    warnings.extend(check_resolver(pattern))
  File "/home/anadon/.cache/pypoetry/virtualenvs/project1-N4OQNeyl-py3.6/lib/python3.6/site-packages/django/core/checks/urls.py", line 23, in check_resolver
    return check_method()
  File "/home/anadon/.cache/pypoetry/virtualenvs/project1-N4OQNeyl-py3.6/lib/python3.6/site-packages/django/urls/resolvers.py", line 397, in check
    warnings.extend(check_resolver(pattern))
  File "/home/anadon/.cache/pypoetry/virtualenvs/project1-N4OQNeyl-py3.6/lib/python3.6/site-packages/django/core/checks/urls.py", line 23, in check_resolver
    return check_method()
  File "/home/anadon/.cache/pypoetry/virtualenvs/project1-N4OQNeyl-py3.6/lib/python3.6/site-packages/django/urls/resolvers.py", line 398, in check
    return warnings or self.pattern.check()
AttributeError: 'str' object has no attribute 'check'

```

--
You received this message because you are subscribed to a topic in the Google Groups "Django users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-users/ACLGAT0lUGQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/2635901b-c6fe-49b0-8269-f5f99a860d99%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAFkJGReKd-Uijt6L2gkOgqHjBEwPaezGzw%3DdqtYcVFuW2jwOmA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment