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

2019-04-03 Thread Josh Marshall
OK, I've gotten time to touch the code again, applied your suggestion, but 
there is no apparent change in behavior.  For the sake of argument, I'm 
including the stack trace again.  I'm not sure where my good debugging 
entry point is here.

-- 
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+unsubscr...@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/dbcc8d62-4e9b-4195-ab15-9865c6bdf9e9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


stack trace
Description: Binary data


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

2019-04-01 Thread nm
Then I'd suggest you try commenting out the relevant settings and urls 
(urlpatterns 
= [path('__debug__/', include(debug_toolbar.urls)),] or whatever you have 
there), and see what happens when you run `./manage.py check`. 

I once had a url-related problem that only appeared when I ran tests; it 
would disappear when I disabled the toolbar. Mine was a different one, but 
I thought maybe your error has something to do with the toolbar, since you 
said it certainly wasn't the app's code.

On Monday, 1 April 2019 15:51:18 UTC+2, Josh Marshall wrote:
>
> I do in fact use Django Debug Toolbar.
>
> On Mon, Apr 1, 2019 at 9:19 AM nm > 
> 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 
>>> 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
>>> 

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

2019-04-01 Thread Josh Marshall
I do in fact use Django Debug Toolbar.

On Mon, Apr 1, 2019 at 9:19 AM nm 
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 
>> 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 

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

2019-04-01 Thread nm
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 
> 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 the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving 

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

2019-03-31 Thread Josh Marshall
Identical behavior.

On Sunday, March 31, 2019 at 12:42:17 AM UTC-4, jlgimeno71 wrote:
>
>
> On Sat, Mar 30, 2019 at 7:31 PM 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 
>> 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 the Google Groups 
>> "Django users" group.
>> To unsubscribe from this group and stop receiving 

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

2019-03-30 Thread Jorge Gimeno
On Sat, Mar 30, 2019 at 7:31 PM Josh Marshall <
joshua.r.marshall.1...@gmail.com> 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 
> 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 the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@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
> 

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

2019-03-30 Thread Josh Marshall
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: 
.
  """)
Auto generated 7 views for endpoints
Traceback (most recent call last):
  File "./manage.py", line 28, in 
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 the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@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/af68afca-05c2-4241-a089-835387b4217b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.