Code

Ticket #11075: error_traceback.txt

File error_traceback.txt, 3.2 KB (added by singingwolfboy, 5 years ago)

Traceback of error occurance

Line 
1[baumgold@argon mplanner]$ python manage.py shell
2Python 2.4.3 (#1, Sep 17 2008, 16:04:01)
3[GCC 4.1.2 20071124 (Red Hat 4.1.2-41)] on linux2
4Type "help", "copyright", "credits" or "license" for more information.
5(InteractiveConsole)
6>>> from mplanner.planner import models
7>>> group = models.PerformanceGroup.objects.get(pk=1)
8>>> group.name
9u'Proscenium'
10>>> user = models.User.objects.get(pk=1)
11>>> user.username
12u'Baumgold'
13>>> from datetime import date
14>>> m1 = models.PerformanceGroupMembership(user = user, performance_group = group, title = 'President', date_joined = date.today())
15>>> m1
16<PerformanceGroupMembership: PerformanceGroupMembership object>
17>>> m1.date_joined
18datetime.date(2009, 5, 11)
19>>> m1.save()
20Traceback (most recent call last):
21  File "<console>", line 1, in ?
22  File "/usr/lib/python2.4/site-packages/Django-1.0.2_final-py2.4.egg/django/db/models/base.py", line 311, in save
23    self.save_base(force_insert=force_insert, force_update=force_update)
24  File "/usr/lib/python2.4/site-packages/Django-1.0.2_final-py2.4.egg/django/db/models/base.py", line 371, in save_base
25    values = [(f, f.get_db_prep_save(raw and getattr(self, f.attname) or f.pre_save(self, True))) for f in meta.local_fields if not isinstance(f, AutoField)]
26  File "/usr/lib/python2.4/site-packages/Django-1.0.2_final-py2.4.egg/django/db/models/fields/__init__.py", line 192, in get_db_prep_save
27    return self.get_db_prep_value(value)
28  File "/usr/lib/python2.4/site-packages/Django-1.0.2_final-py2.4.egg/django/db/models/fields/__init__.py", line 496, in get_db_prep_value
29    return connection.ops.value_to_db_date(self.to_python(value))
30  File "/usr/lib/python2.4/site-packages/Django-1.0.2_final-py2.4.egg/django/db/models/fields/__init__.py", line 458, in to_python
31    raise exceptions.ValidationError(
32ValidationError: Enter a valid date in YYYY-MM-DD format.
33>>> m1 = models.PerformanceGroupMembership(user = user, performance_group = group, title = 'President', date_joined = u'2009-05-11')
34>>> m1.date_joined
35u'2009-05-11'
36>>> m1.save()Traceback (most recent call last):
37  File "<console>", line 1, in ?
38  File "/usr/lib/python2.4/site-packages/Django-1.0.2_final-py2.4.egg/django/db/models/base.py", line 311, in save
39    self.save_base(force_insert=force_insert, force_update=force_update)
40  File "/usr/lib/python2.4/site-packages/Django-1.0.2_final-py2.4.egg/django/db/models/base.py", line 371, in save_base
41    values = [(f, f.get_db_prep_save(raw and getattr(self, f.attname) or f.pre_save(self, True))) for f in meta.local_fields if not isinstance(f, AutoField)]
42  File "/usr/lib/python2.4/site-packages/Django-1.0.2_final-py2.4.egg/django/db/models/fields/__init__.py", line 192, in get_db_prep_save
43    return self.get_db_prep_value(value)
44  File "/usr/lib/python2.4/site-packages/Django-1.0.2_final-py2.4.egg/django/db/models/fields/__init__.py", line 496, in get_db_prep_value
45    return connection.ops.value_to_db_date(self.to_python(value))
46  File "/usr/lib/python2.4/site-packages/Django-1.0.2_final-py2.4.egg/django/db/models/fields/__init__.py", line 458, in to_python
47    raise exceptions.ValidationError(
48ValidationError: Enter a valid date in YYYY-MM-DD format.
49>>>
50