views:

400

answers:

1

I'm using Django-grappelli in my project, but Django is send me a lot of errors to my email about some files that Django didn't found...but I don't know from where is calling this files...some time files .aspx (??)

Here is a image with the error list in my inboxalt text

Here is a error detail:

Traceback (most recent call last):

  File "/home/*******/django/lib/python2.5/django/core/handlers/base.py", line 92, in get_response
    response = callback(request, *callback_args, **callback_kwargs)

  File "/home/*******/django/lib/python2.5/django/contrib/admin/options.py", line 226, in wrapper
    return self.admin_site.admin_view(view)(*args, **kwargs)

  File "/home/*******/django/lib/python2.5/django/views/decorators/cache.py", line 44, in _wrapped_view_func
    response = view_func(request, *args, **kwargs)

  File "/home/*******/django/lib/python2.5/django/contrib/admin/sites.py", line 186, in inner
    return view(request, *args, **kwargs)

  File "/home/*******/django/lib/python2.5/django/db/transaction.py", line 240, in _commit_on_success
    res = func(*args, **kw)

  File "/home/*******/django/lib/python2.5/django/contrib/admin/options.py", line 793, in change_view
    obj = self.queryset(request).get(pk=unquote(object_id))

  File "/home/*******/django/lib/python2.5/django/db/models/query.py", line 299, in get
    clone = self.filter(*args, **kwargs)

  File "/home/*******/django/lib/python2.5/django/db/models/query.py", line 498, in filter
    return self._filter_or_exclude(False, *args, **kwargs)

  File "/home/*******/django/lib/python2.5/django/db/models/query.py", line 516, in _filter_or_exclude
    clone.query.add_q(Q(*args, **kwargs))

  File "/home/*******/django/lib/python2.5/django/db/models/sql/query.py", line 1675, in add_q
    can_reuse=used_aliases)

  File "/home/*******/django/lib/python2.5/django/db/models/sql/query.py", line 1614, in add_filter
    connector)

  File "/home/*******/django/lib/python2.5/django/db/models/sql/where.py", line 56, in add
    obj, params = obj.process(lookup_type, value)

  File "/home/*******/django/lib/python2.5/django/db/models/sql/where.py", line 269, in process
    params = self.field.get_db_prep_lookup(lookup_type, value)

  File "/home/*******/django/lib/python2.5/django/db/models/fields/__init__.py", line 210, in get_db_prep_lookup
    return [self.get_db_prep_value(value)]

  File "/home/*******/django/lib/python2.5/django/db/models/fields/__init__.py", line 361, in get_db_prep_value
    return int(value)

ValueError: invalid literal for int() with base 10: 'add/css/slimbox.css'


<WSGIRequest
GET:<QueryDict: {}>,
POST:<QueryDict: {}>,
COOKIES:{'__utma': '9939636.788794993.1264095329.1264182265.1264185471.12',
 '__utmb': '9939636.6.10.1264185471',
 '__utmc': '9939636',
 '__utmz': '9939636.1264095329.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)',
 'sessionid': '7cbe112dbf1b85f902262a9757c8c6d4'},
META:{'DOCUMENT_ROOT': '/usr/local/apache2/htdocs',
 'GATEWAY_INTERFACE': 'CGI/1.1',
 'HTTP_ACCEPT': '*/*',
 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
 'HTTP_ACCEPT_LANGUAGE': 'es-ar',
 'HTTP_CONNECTION': 'close',
 'HTTP_COOKIE': '__utma=9939636.788794993.1264095329.1264182265.1264185471.12; __utmz=9939636.1264095329.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utmc=9939636; __utmb=9939636.6.10.1264185471; sessionid=7cbe112dbf1b85f902262a9757c8c6d4',
 'HTTP_HOST': 'www.*******',
 'HTTP_REFERER': 'http://www.*******/admin/noticias/noticia/add/',
 'HTTP_USER_AGENT': 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; GTB6.3; .NET CLR 1.1.4322; .NET CLR 2.0.50727; OfficeLiveConnector.1.3; OfficeLivePatch.0.0)',
 'HTTP_X_FORWARDED_FOR': '201.229.208.152',
 'PATH': '/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/*******/bin',
 'PATH_INFO': u'/admin/noticias/noticia/add/css/slimbox.css/',
 'PATH_TRANSLATED': '/home/*******/django/*******.wsgi/admin/noticias/noticia/add/css/slimbox.css/',
 'QUERY_STRING': '',
 'REMOTE_ADDR': '127.0.0.1',
 'REMOTE_PORT': '34304',
 'REQUEST_METHOD': 'GET',
 'REQUEST_URI': '/admin/noticias/noticia/add/css/slimbox.css/',
 'SCRIPT_FILENAME': '/*******/django/*******.wsgi',
 'SCRIPT_NAME': u'',
 'SERVER_ADDR': '127.0.0.1',
 'SERVER_ADMIN': '[no address given]',
 'SERVER_NAME': 'www.*******',
 'SERVER_PORT': '80',
 'SERVER_PROTOCOL': 'HTTP/1.0',
 'SERVER_SIGNATURE': '',
 'SERVER_SOFTWARE': 'Apache/2.2.12 (Unix) mod_wsgi/2.5 Python/2.5.4',
 'mod_wsgi.application_group': '*******.com|',
 'mod_wsgi.callable_object': 'application',
 'mod_wsgi.listener_host': '',
 'mod_wsgi.listener_port': '*******',
 'mod_wsgi.process_group': '',
 'mod_wsgi.reload_mechanism': '0',
 'mod_wsgi.script_reloading': '1',
 'mod_wsgi.version': (2, 5),
 'wsgi.errors': <mod_wsgi.Log object at 0x9016d40>,
 'wsgi.file_wrapper': <built-in method file_wrapper of mod_wsgi.Adapter object at 0x91e97b8>,
 'wsgi.input': <mod_wsgi.Input object at 0x901cca0>,
 'wsgi.multiprocess': True,
 'wsgi.multithread': False,
 'wsgi.run_once': False,
 'wsgi.url_scheme': 'http',
 'wsgi.version': (1, 0)}>

The website is running very nice, but my email is full of this errors, and the best thing is that i dont have any of these files in my project....

Sorry if the error is too long and sorry with my English.

Thanks guys

A: 

ValueError: invalid literal for int() with base 10: 'add/css/slimbox.css'

Apparently there's a view function expecting a string containing only digits, but for some reason that string contains literal characters, and made his way to a int() constructor. This could be due to a wrong regex in your URLconf, and, probably you forgot to surround a code block with the proper try..except.

Other common reason for receiving tons of emails from django is

SEND_BROKEN_LINK_EMAILS = True

in settings.py

dschulz