Here is mine, since I don't know how to reference dpaste... ;)
Environment:

Request Method: GET
Request URL: http://localhost:8000/admin/tvsite/areas/1/areas/batzos.jpeg/
Django Version: 1.0-final-SVN-unknown
Python Version: 2.5.2
Installed Applications:
['django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'tv.tvsite']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware')


Traceback:
File "C:\Python25\Lib\site-packages\django\core\handlers\base.py" in
get_response
  86.                 response = callback(request, *callback_args,
**callback_kwargs)
File "C:\Python25\Lib\site-packages\django\contrib\admin\sites.py" in root
  158.                 return self.model_page(request, *url.split('/', 2))
File "C:\Python25\lib\site-packages\django\views\decorators\cache.py"
in _wrapped_view_func
  44.         response = view_func(request, *args, **kwargs)
File "C:\Python25\Lib\site-packages\django\contrib\admin\sites.py" in model_page
  177.         return admin_obj(request, rest_of_url)
File "C:\Python25\Lib\site-packages\django\contrib\admin\options.py" in __call__
  197.             return self.change_view(request, unquote(url))
File "C:\Python25\Lib\site-packages\django\db\transaction.py" in
_commit_on_success
  238.                 res = func(*args, **kw)
File "C:\Python25\Lib\site-packages\django\contrib\admin\options.py"
in change_view
  557.             obj = model._default_manager.get(pk=object_id)
File "C:\Python25\Lib\site-packages\django\db\models\manager.py" in get
  93.         return self.get_query_set().get(*args, **kwargs)
File "C:\Python25\Lib\site-packages\django\db\models\query.py" in get
  297.         clone = self.filter(*args, **kwargs)
File "C:\Python25\Lib\site-packages\django\db\models\query.py" in filter
  483.         return self._filter_or_exclude(False, *args, **kwargs)
File "C:\Python25\Lib\site-packages\django\db\models\query.py" in
_filter_or_exclude
  501.             clone.query.add_q(Q(*args, **kwargs))
File "C:\Python25\Lib\site-packages\django\db\models\sql\query.py" in add_q
  1224.                             can_reuse=used_aliases)
File "C:\Python25\Lib\site-packages\django\db\models\sql\query.py" in add_filter
  1167.         self.where.add((alias, col, field, lookup_type,
value), connector)
File "C:\Python25\Lib\site-packages\django\db\models\sql\where.py" in add
  48.                 params = field.get_db_prep_lookup(lookup_type, value)
File "C:\Python25\Lib\site-packages\django\db\models\fields\__init__.py"
in get_db_prep_lookup
  202.             return [self.get_db_prep_value(value)]
File "C:\Python25\Lib\site-packages\django\db\models\fields\__init__.py"
in get_db_prep_value
  353.         return int(value)

Exception Type: ValueError at /admin/tvsite/areas/1/areas/batzos.jpeg/
Exception Value: invalid literal for int() with base 10: '1/areas/batzos.jpeg'



2008/9/18 kelvin pompey <[EMAIL PROTECTED]>:
> Everything is being handled by the admin application.
>
> Environment:
>
> Request Method: GET
> Request URL:
> http://localhost:8000/admin/grades/student/1/photos/desktop.png/
> Django Version: 1.0-final-SVN-unknown
> Python Version: 2.5.2
> Installed Applications:
> ['django.contrib.auth',
>  'django.contrib.contenttypes',
>  'django.contrib.sessions',
>  'django.contrib.sites',
>  'django.contrib.admin',
>  'sgms.grades']
> Installed Middleware:
> ('django.middleware.common.CommonMiddleware',
>  'django.contrib.sessions.middleware.SessionMiddleware',
>  'django.contrib.auth.middleware.AuthenticationMiddleware')
>
>
> Traceback:
> File "/usr/lib/python2.5/site-packages/django/core/handlers/base.py" in
> get_response
>   86.                 response = callback(request, *callback_args,
> **callback_kwargs)
> File "/usr/lib/python2.5/site-packages/django/contrib/admin/sites.py" in
> root
>   158.                 return self.model_page(request, *url.split('/', 2))
> File "/usr/lib/python2.5/site-packages/django/views/decorators/cache.py" in
> _wrapped_view_func
>   44.         response = view_func(request, *args, **kwargs)
> File "/usr/lib/python2.5/site-packages/django/contrib/admin/sites.py" in
> model_page
>   177.         return admin_obj(request, rest_of_url)
> File "/usr/lib/python2.5/site-packages/django/contrib/admin/options.py" in
> __call__
>   197.             return self.change_view(request, unquote(url))
> File "/usr/lib/python2.5/site-packages/django/db/transaction.py" in
> _commit_on_success
>   238.                 res = func(*args, **kw)
> File "/usr/lib/python2.5/site-packages/django/contrib/admin/options.py" in
> change_view
>   557.             obj = model._default_manager.get(pk=object_id)
> File "/usr/lib/python2.5/site-packages/django/db/models/manager.py" in get
>   93.         return self.get_query_set().get(*args, **kwargs)
> File "/usr/lib/python2.5/site-packages/django/db/models/query.py" in get
>   297.         clone = self.filter(*args, **kwargs)
> File "/usr/lib/python2.5/site-packages/django/db/models/query.py" in filter
>   483.         return self._filter_or_exclude(False, *args, **kwargs)
> File "/usr/lib/python2.5/site-packages/django/db/models/query.py" in
> _filter_or_exclude
>   501.             clone.query.add_q(Q(*args, **kwargs))
> File "/usr/lib/python2.5/site-packages/django/db/models/sql/query.py" in
> add_q
>   1224.                             can_reuse=used_aliases)
> File "/usr/lib/python2.5/site-packages/django/db/models/sql/query.py" in
> add_filter
>   1167.         self.where.add((alias, col, field, lookup_type, value),
> connector)
> File "/usr/lib/python2.5/site-packages/django/db/models/sql/where.py" in add
>   48.                 params = field.get_db_prep_lookup(lookup_type, value)
> File "/usr/lib/python2.5/site-packages/django/db/models/fields/__init__.py"
> in get_db_prep_lookup
>   202.             return [self.get_db_prep_value(value)]
> File "/usr/lib/python2.5/site-packages/django/db/models/fields/__init__.py"
> in get_db_prep_value
>   353.         return int(value)
>
> Exception Type: ValueError at /admin/grades/student/1/photos/desktop.png/
> Exception Value: invalid literal for int() with base 10:
> '1/photos/desktop.png'
>
> On Thu, Sep 18, 2008 at 9:47 AM, Ross <[EMAIL PROTECTED]> wrote:
>>
>> The error looks like you are passing '1/photos/desktop.png' to int(),
>> which converts a string to an integer. How are you creating the link
>> to the picture?
>>
>> Your urls.py could be capturing that entire string and passing it as a
>> parameter that you are trying to cast to an integer.
>>
>> A bigger stack trace would be easier to track down the problem.
>>
>> On Sep 18, 8:34 am, Picio <[EMAIL PROTECTED]> wrote:
>> > I have the same issue, tried:
>> > Django 1.0 with sqlite3 (Wiindows)
>> > Django 1.0 with Mysql 5.0 (Windows)
>> > Django 1.0 with sqlite3 (Mac OS X)
>> >
>> > Daniele
>> >
>> > 2008/9/18 silk.odyssey <[EMAIL PROTECTED]>:
>> >
>> >
>> >
>> > > I am using an imagefield from the admin interface. I can upload images
>> > > without problems but when I click the link to view the image, I get
>> > > the following error.
>> >
>> > > invalid literal for int() with base 10: '1/photos/desktop.png'
>> >
>> > > Any idea what's wrong? I am using django 1.0.
>>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to