-
Notifications
You must be signed in to change notification settings - Fork 21
schedule
Sheila Miguez edited this page May 9, 2014
·
8 revisions
pfft. I'm using military time and they want to use
time_obj = time.strptime(x, '%I:%M %p')
csv file parsing debug
date,time_start,time_end,kind,room
7/8/2014,10:05,10:35,Education,Grand Ballroom
7/8/2014,10:05,10:35,Geospatial,Room 203
7/8/2014,10:05,10:35,General,Room 204
7/8/2014,10:35,11:05,Education,Grand Ballroom
7/8/2014,10:35,11:05,Geospatial,Room 203
7/8/2014,10:35,11:05,General,Room 204
7/8/2014,11:05,11:15,Break,Hallway
end
u'Malformed time found: 10:05.'
room
<Room: Grand Ballroom>
created
True
self
<symposion.schedule.forms.ScheduleSectionForm object at 0x7f6fd80a2750>
created_items
[<Room: Grand Ballroom>,
<Room: Hallway>,
<Room: Room 204>,
<SlotKind: Education>]
start
40
slot_kind
<SlotKind: Education>
reader
<csv.DictReader instance at 0x7f6ff8207998>
date
datetime.datetime(2014, 7, 8, 0, 0)
x
{'date': '7/8/2014',
'kind': 'Break',
'room': 'Hallway',
'time_end': '11:15',
'time_start': '11:05'}
data
[{'date': '7/8/2014',
'kind': 'Education',
'room': 'Grand Ballroom',
'time_end': '10:35',
'time_start': '10:05'},
{'date': '7/8/2014',
'kind': 'Geospatial',
'room': 'Room 203',
'time_end': '10:35',
'time_start': '10:05'},
{'date': '7/8/2014',
'kind': 'General',
'room': 'Room 204',
'time_end': '10:35',
'time_start': '10:05'},
{'date': '7/8/2014',
'kind': 'Education',
'room': 'Grand Ballroom',
'time_end': '11:05',
'time_start': '10:35'},
{'date': '7/8/2014',
'kind': 'Geospatial',
'room': 'Room 203',
'time_end': '11:05',
'time_start': '10:35'},
{'date': '7/8/2014',
'kind': 'General',
'room': 'Room 204',
'time_end': '11:05',
'time_start': '10:35'},
{'date': '7/8/2014',
'kind': 'Break',
'room': 'Hallway',
'time_end': '11:15',
'time_start': '11:05'}]
day
<Day: 2014-07-08>
row
{'date': '7/8/2014',
'kind': 'Education',
'room': 'Grand Ballroom',
'time_end': '10:35',
'time_start': '10:05'}
Traceback:
File "/home/sheila/.virtualenvs/scipy2014/local/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
111. response = callback(request, *callback_args, **callback_kwargs)
File "/home/sheila/.virtualenvs/scipy2014/local/lib/python2.7/site-packages/django/contrib/auth/decorators.py" in _wrapped_view
20. return view_func(request, *args, **kwargs)
File "/home/sheila/.virtualenvs/scipy2014/src/symposion/symposion/schedule/views.py" in schedule_edit
110. msg = form.build_schedule()
File "/home/sheila/.virtualenvs/scipy2014/src/symposion/symposion/schedule/forms.py" in build_schedule
146. kind=slot_kind, day=day, start=start, end=end
File "/home/sheila/.virtualenvs/scipy2014/local/lib/python2.7/site-packages/django/db/models/manager.py" in create
137. return self.get_query_set().create(**kwargs)
File "/home/sheila/.virtualenvs/scipy2014/local/lib/python2.7/site-packages/django/db/models/query.py" in create
377. obj.save(force_insert=True, using=self.db)
File "/home/sheila/.virtualenvs/scipy2014/local/lib/python2.7/site-packages/django/db/models/base.py" in save
463. self.save_base(using=using, force_insert=force_insert, force_update=force_update)
File "/home/sheila/.virtualenvs/scipy2014/local/lib/python2.7/site-packages/django/db/models/base.py" in save_base
551. result = manager._insert([self], fields=fields, return_id=update_pk, using=using, raw=raw)
File "/home/sheila/.virtualenvs/scipy2014/local/lib/python2.7/site-packages/django/db/models/manager.py" in _insert
203. return insert_query(self.model, objs, fields, **kwargs)
File "/home/sheila/.virtualenvs/scipy2014/local/lib/python2.7/site-packages/django/db/models/query.py" in insert_query
1593. return query.get_compiler(using=using).execute_sql(return_id)
File "/home/sheila/.virtualenvs/scipy2014/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py" in execute_sql
911. for sql, params in self.as_sql():
File "/home/sheila/.virtualenvs/scipy2014/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py" in as_sql
872. for obj in self.query.objs
File "/home/sheila/.virtualenvs/scipy2014/local/lib/python2.7/site-packages/django/db/models/fields/__init__.py" in get_db_prep_save
292. prepared=False)
File "/home/sheila/.virtualenvs/scipy2014/local/lib/python2.7/site-packages/django/db/models/fields/__init__.py" in get_db_prep_value
1251. value = self.get_prep_value(value)
File "/home/sheila/.virtualenvs/scipy2014/local/lib/python2.7/site-packages/django/db/models/fields/__init__.py" in get_prep_value
1246. return self.to_python(value)
File "/home/sheila/.virtualenvs/scipy2014/local/lib/python2.7/site-packages/django/db/models/fields/__init__.py" in to_python
1235. raise exceptions.ValidationError(msg)
Exception Type: ValidationError at /scipy2014/schedule/talks-posters/edit/
Exception Value: [u"'40' value has an invalid format. It must be in HH:MM[:ss[.uuuuuu]] format."]