Re: [Django] #26886: TECHNICAL_404_TEMPLATE logs an "Exception while resolving variable" warning

2017-08-24 Thread Django
#26886: TECHNICAL_404_TEMPLATE logs an "Exception while resolving variable" 
warning
-+-
 Reporter:  None |Owner:  None
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  Error reporting  |  Version:  1.9
 Severity:  Normal   |   Resolution:  duplicate
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Tim Graham):

 * status:  new => closed
 * resolution:   => duplicate


Comment:

 I created #28526 to address the problem of verbose, often unhelpful
 logging of undefined variables.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.ac3f2650baa3829acc9c19e126aa1258%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #26886: TECHNICAL_404_TEMPLATE logs an "Exception while resolving variable" warning

2017-08-04 Thread Django
#26886: TECHNICAL_404_TEMPLATE logs an "Exception while resolving variable" 
warning
--+
 Reporter:  None  |Owner:  None
 Type:  Cleanup/optimization  |   Status:  new
Component:  Error reporting   |  Version:  1.9
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+

Comment (by Sharmila G Sivakumar):

 Hi,

 I another developer who has encountered the same issue. I perused the
 comments on the mailing list also to see how this would be handled. I
 agree with the sentiment that errors need to be raised as they are good
 indicators of underlying issues that need to be fixed. That is true even
 if, overall, the system works. On the other hand it would be great if the
 error can be identified for what it is - An known error raised by django
 internals and handled accordingly. Like the contributer Antony King
 suggested, a single line capturing the essence of the error would suffice

 ``
 some_app/home.html:32:24: Undefined variable: missing_variable
 ``

 The reason I am suggesting this is, I am using Django 1.11 and the
 Template_404's error messages are drowning out all other errors. The error
 is basically caused by favicon.ico resulting in a 404. In the process of
 development, favicons are the last priority.  So, the developers might
 have to endure the error messages for a long time. Adding a temporary
 favicon is a possibility, but I would rather prefer a `"GET /favicon.ico
 HTTP/1.1" 404 4296` message on the console to remind that favicon is not
 set :)

 I am providing an example of an exception trace from a single favicon 404
 error. May be I am doing something wrong too. If so please suggest an
 appropriate correction.


 Exception while resolving variable 'name' in template 'unknown'.
 Traceback (most recent call last):
   File "/home/code/product_recco/reddit_env/lib/python3.6/site-
 packages/django/core/handlers/exception.py", line 41, in inner
 response = get_response(request)
   File "/home/code/product_recco/reddit_env/lib/python3.6/site-
 packages/django/core/handlers/base.py", line 172, in _get_response
 resolver_match = resolver.resolve(request.path_info)
   File "/home/code/product_recco/reddit_env/lib/python3.6/site-
 packages/django/urls/resolvers.py", line 392, in resolve
 raise Resolver404({'tried': tried, 'path': new_path})
 django.urls.exceptions.Resolver404: {'tried': [[ (djdt:djdt) ^__debug__/>],
 [ (admin:admin) ^admin/>],
 [
 (None:None) ^>, ], [
 (None:None) ^>, ], [ (None:None) ^>, ],
 [
 (None:None) ^>, [a-zA-Z0-9-]+)/most-
 voted/$>], [
 (None:None) ^>, [a-zA-Z0-9-]+)/most-recent/$>], [ (None:None) ^>, [a-zA-Z0-9-]+)/most-voted/$>], [<
 RegexURLResolver  (None:None) ^>, [a-zA-Z0-9-]+)/most-recent
 /$>], [ (None:None) ^>, [0-9]+)/(?P[a
 -zA-Z0-9-_]+)/$>], [
 (None:None) ^>, [a
 -zA-Z0-9-_]+)/$>], [ (None:None) ^>, ], [.*)$>]], 'path':
 'favicon.ico'}

 During handling of the above exception, another exception occurred:

 Traceback (most recent call last):
   File "/home/code/product_recco/reddit_env/lib/python3.6/site-
 packages/django/template/base.py", line 882
 , in _resolve_lookup
 current = current[bit]
 TypeError: 'RegexURLResolver' object is not subscriptable

 During handling of the above exception, another exception occurred:

 Traceback (most recent call last):
   File "/home/code/product_recco/reddit_env/lib/python3.6/site-
 packages/django/template/base.py", line 890
 , in _resolve_lookup
 current = getattr(current, bit)
 AttributeError: 'RegexURLResolver' object has no attribute 'name'

 During handling of the above exception, another exception occurred:

 Traceback (most recent call last):
   File "/home/code/product_recco/reddit_env/lib/python3.6/site-
 packages/django/template/base.py", line 896, in _resolve_lookup
 current = current[int(bit)]
 ValueError: invalid literal for int() with base 10: 'name'

 During handling of the above exception, another exception occurred:

 Traceback (most recent call last):
   File "/home/code/product_recco/reddit_env/lib/python3.6/site-
 packages/django/template/base.py", line 903, in _resolve_lookup
 (bit, current))  # missing attribute
 django.template.base.VariableDoesNotExist: Failed lookup for key [name] in
 " (djdt:djdt) ^__debug__/>"
 Exception while resolving variable 'name' in template 'unknown'.
 Traceback (most recent call last):
   File "/home/code/product_recco/reddit_env/lib/python3.6/site-
 packages/django/core/handlers/exception.py", line 41, in inner

Re: [Django] #26886: TECHNICAL_404_TEMPLATE logs an "Exception while resolving variable" warning

2017-03-16 Thread Django
#26886: TECHNICAL_404_TEMPLATE logs an "Exception while resolving variable" 
warning
--+
 Reporter:  None  |Owner:  None
 Type:  Cleanup/optimization  |   Status:  new
Component:  Error reporting   |  Version:  1.9
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+

Comment (by Tim Graham):

 I started a thread on the [https://groups.google.com/d/topic/django-
 developers/zdULZcmAWNw/discussion django-developers mailing list] to see
 if there might be consensus to remove logging of undefined variables.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.496e1e94134697f7eb82f6eae2101b75%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #26886: TECHNICAL_404_TEMPLATE logs an "Exception while resolving variable" warning

2017-03-15 Thread Django
#26886: TECHNICAL_404_TEMPLATE logs an "Exception while resolving variable" 
warning
--+
 Reporter:  None  |Owner:  None
 Type:  Cleanup/optimization  |   Status:  new
Component:  Error reporting   |  Version:  1.9
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by Tim Abbott):

 * cc: tabbott@… (added)


Comment:

 We were seeing this a lot in the Zulip development environment and found
 it pretty confusing for new contributors, so we worked around it using
 https://github.com/zulip/zulip/pull/4076.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.acfb20ffa80186ffbc9573252b8c113a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #26886: TECHNICAL_404_TEMPLATE logs an "Exception while resolving variable" warning (was: Wrong warnings during template rendering)

2016-09-28 Thread Django
#26886: TECHNICAL_404_TEMPLATE logs an "Exception while resolving variable" 
warning
--+
 Reporter:  None  |Owner:  None
 Type:  Cleanup/optimization  |   Status:  new
Component:  Error reporting   |  Version:  1.9
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by Tim Graham):

 * type:  Bug => Cleanup/optimization
 * stage:  Unreviewed => Accepted


Comment:

 Accepting for further thought.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.0ed2239cb7f998aae53a4ca4d8a9c8fc%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.