value error: year out of range

503 views
Skip to first unread message

nicolar

unread,
May 22, 2009, 5:56:39 AM5/22/09
to reviewboard
hi all,
after modifying a request the dashboard no longer works! i have to log
in in admin area and i have to delete the request in order to get the
system working again. If do not modify the request all works fine.

Can anyone give me a tip?
many thanks!

Nicola

The log of the error:
http://groups.google.com/group/reviewboard/web/ValueError%20at%20_dashboard_.html

nicolar

unread,
May 25, 2009, 4:07:31 AM5/25/09
to reviewboard
Resolved.

I removed old mysql database. I removed the site directory. I changed
locale on my debian lenny from it_IT utf-8 to en_US utf-8. I created a
new mysql database with collation utf-8_general_ci. I recreated the
site from scratch entering: rb-site install <path>.

Now all work fine. But because of my python lack of knowledge I cannot
fugure out where it was the problem. maybe the local settings?

Christian Hammond

unread,
May 25, 2009, 4:15:02 PM5/25/09
to revie...@googlegroups.com
The backtrace you linked to was a 404 here, so I wasn't able to see it. I don't know why you'd get that error or where it came from.

Glad it works now though.

Christian

--
Christian Hammond - chi...@chipx86.com
Review Board - http://www.review-board.org
VMware, Inc. - http://www.vmware.com

nicolar

unread,
May 26, 2009, 3:15:56 AM5/26/09
to reviewboard
On 25 Mag, 22:15, Christian Hammond <chip...@chipx86.com> wrote:
> The backtrace you linked to was a 404 here, so I wasn't able to see it. I
> don't know why you'd get that error or where it came from.
>

Hi,
can I send you the backtrace to your private email address?

> Glad it works now though.
>
> Christian
>

I'm unlucky... it appeared again, always after I submit some changes
to the request. :(

Christian Hammond

unread,
May 26, 2009, 3:17:30 AM5/26/09
to revie...@googlegroups.com
Yep, go ahead. I'll take a look.

It's getting late here, so I may not be able to figure out the problem until tomorrow.


Christian

--
Christian Hammond - chi...@chipx86.com
Review Board - http://www.review-board.org
VMware, Inc. - http://www.vmware.com


James Turnbull

unread,
May 30, 2009, 10:24:35 PM5/30/09
to reviewboard
I think I have a related issue:

ValueError at /dashboard/

month must be in 1..12

Request Method: GET
Request URL: http://reviewboard.reductivelabs.com/dashboard/
Exception Type: ValueError
Exception Value:

month must be in 1..12

Exception Location: /usr/lib/python2.5/site-packages/
Django-1.0.2_final-py2.5.egg/django/db/backends/util.py in
typecast_timestamp, line 88
Python Executable: /usr/bin/python
Python Version: 2.5.2
Python Path: ['/opt/reviewboard.reductivelabs.com/conf', '/usr/lib/
python2.5/site-packages/Twisted-8.1.0-py2.5-linux-x86_64.egg', '/usr/
lib/python2.5/site-packages/zope.interface-3.4.1-py2.5-linux-
x86_64.egg', '/usr/lib/python2.5/site-packages/buildbot-0.7.9-
py2.5.egg', '/usr/lib/python2.5/site-packages/ReviewBoard-1.0rc2-
py2.5.egg', '/usr/lib/python2.5/site-packages/pytz-2009g-py2.5.egg', '/
usr/lib/python2.5/site-packages/flup-1.0.2-py2.5.egg', '/usr/lib/
python2.5/site-packages/Pygments-1.0-py2.5.egg', '/usr/lib/python2.5/
site-packages/Djblets-0.5rc1-py2.5.egg', '/usr/lib/python2.5/site-
packages/django_evolution-0.0.0-py2.5.egg', '/usr/lib/python2.5/site-
packages/Django-1.0.2_final-py2.5.egg', '/usr/lib/python2.5/site-
packages/PIL-1.1.6-py2.5-linux-x86_64.egg', '/usr/lib/python2.5/site-
packages/MySQL_python-1.2.3c1-py2.5-linux-x86_64.egg', '/usr/lib/
python2.5/site-packages/RBTools-0.2beta1-py2.5.egg', '/usr/lib/
python2.5/site-packages/simplejson-2.0.9-py2.5-linux-x86_64.egg', '/
usr/lib/python25.zip', '/usr/lib/python2.5', '/usr/lib/python2.5/plat-
linux2', '/usr/lib/python2.5/lib-tk', '/usr/lib/python2.5/lib-
dynload', '/usr/local/lib/python2.5/site-packages', '/usr/lib/
python2.5/site-packages', '/var/lib/python-support/python2.5']
Server time: Sat, 30 May 2009 20:19:16 -0600
Traceback Switch to copy-and-paste view

* /usr/lib/python2.5/site-packages/Django-1.0.2_final-py2.5.egg/
django/core/handlers/base.py in get_response
79. # Apply view middleware
80. for middleware_method in self._view_middleware:
81. response = middleware_method(request, callback,
callback_args, callback_kwargs)
82. if response:
83. return response
84.
85. try:
86. response = callback(request, *callback_args,
**callback_kwargs) ...
87. except Exception, e:
88. # If the view raised an exception, run it through
exception
89. # middleware, and if the exception middleware returns a
90. # response, use that. Otherwise, reraise the exception.
91. for middleware_method in self._exception_middleware:
92. response = middleware_method(request, e)
▼ Local vars
Variable Value
callback
<function dashboard at 0x17705f0>
callback_args
()
callback_kwargs
{}
e
ValueError('month must be in 1..12',)
exc_info
(<type 'exceptions.ValueError'>, ValueError('month must be in
1..12',), <traceback object at 0x1bb5368>)
exceptions
<module 'django.core.exceptions' from '/usr/lib/python2.5/site-
packages/Django-1.0.2_final-py2.5.egg/django/core/exceptions.pyc'>
middleware_method
<bound method LoggingMiddleware.process_view of
<djblets.log.middleware.LoggingMiddleware object at 0x1ae3b50>>
receivers
[(<function _rollback_on_exception at 0xe0caa0>, None)]
request
<ModPythonRequest path:/dashboard/, GET:<QueryDict: {}>,
POST:<QueryDict: {}>, COOKIES:{'__utma':
'185464106.1180843268.1233055212.1243482579.1243657150.204', '__utmc':
'185464106', '__utmz': '185464106.1242638869.185.34.utmccn=(organic)|
utmcsr=google|utmctr=collect+export+virtual+resources+Puppet|
utmcmd=organic', 'collapsediffs': 'True', 'rbsessionid':
'80125ff72916ab0bdef7a7d1f57bbfed'}, META:{'AUTH_TYPE': None,
'CONTENT_LENGTH': 0L, 'CONTENT_TYPE': None, 'GATEWAY_INTERFACE': 'CGI/
1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/
xml;q=0.9,*/*;q=0.8', 'HTTP_ACCEPT_CHARSET':
'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'HTTP_ACCEPT_ENCODING':
'gzip,deflate', 'HTTP_ACCEPT_LANGUAGE': 'en-au,en-us;q=0.7,en;q=0.3',
'HTTP_CONNECTION': 'keep-alive', 'HTTP_COOKIE':
'__utma=185464106.1180843268.1233055212.1243482579.1243657150.204;
__utmz=185464106.1242638869.185.34.utmccn=(organic)|utmcsr=google|
utmctr=collect+export+virtual+resources+Puppet|utmcmd=organic;
__utmc=185464106; rbsessionid=80125ff72916ab0bdef7a7d1f57bbfed;
collapsediffs=True', 'HTTP_HOST': 'reviewboard.reductivelabs.com',
'HTTP_KEEP_ALIVE': '300', 'HTTP_USER_AGENT': 'Mozilla/5.0 (Macintosh;
U; Intel Mac OS X 10.5; en-GB; rv:1.9.0.10) Gecko/2009042315 Firefox/
3.0.10', 'PATH_INFO': u'/dashboard/', 'PATH_TRANSLATED': None,
'QUERY_STRING': None, 'REMOTE_ADDR': '203.217.85.205', 'REMOTE_HOST':
None, 'REMOTE_IDENT': None, 'REMOTE_USER': None, 'REQUEST_METHOD':
'GET', 'SCRIPT_NAME': '', 'SERVER_NAME':
'reviewboard.reductivelabs.com', 'SERVER_PORT': 0, 'SERVER_PROTOCOL':
'HTTP/1.1', 'SERVER_SOFTWARE': 'mod_python'}>
resolver
<RegexURLResolver djblets.util.rooturl ^/>
response
None
self
<django.core.handlers.modpython.ModPythonHandler object at
0x17e1b90>
settings
<django.conf.LazySettings object at 0xa8d850>
urlconf
'djblets.util.rooturl'
urlresolvers
<module 'django.core.urlresolvers' from '/usr/lib/python2.5/site-
packages/Django-1.0.2_final-py2.5.egg/django/core/urlresolvers.pyc'>
* /usr/lib/python2.5/site-packages/Djblets-0.5rc1-py2.5.egg/
djblets/auth/util.py in _checklogin
38. def login_required(view_func):
39. """Simplified version of auth.decorators.login_required,
40. which works with our LOGIN_URL and removes the 'next'
41. parameter which we don't need yet.
42. """
43. def _checklogin(request, *args, **kwargs):
44. if request.user.is_authenticated():
45. return view_func(request, *args, **kwargs) ...
46. else:
47. return HttpResponseRedirect('%s?next_page=%s' % \
48. (settings.LOGIN_URL, request.path))
49. return _checklogin
50.
51. def get_user(username):
▶ Local vars
Variable Value
args
()
kwargs
{}
request
<ModPythonRequest path:/dashboard/, GET:<QueryDict: {}>,
POST:<QueryDict: {}>, COOKIES:{'__utma':
'185464106.1180843268.1233055212.1243482579.1243657150.204', '__utmc':
'185464106', '__utmz': '185464106.1242638869.185.34.utmccn=(organic)|
utmcsr=google|utmctr=collect+export+virtual+resources+Puppet|
utmcmd=organic', 'collapsediffs': 'True', 'rbsessionid':
'80125ff72916ab0bdef7a7d1f57bbfed'}, META:{'AUTH_TYPE': None,
'CONTENT_LENGTH': 0L, 'CONTENT_TYPE': None, 'GATEWAY_INTERFACE': 'CGI/
1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/
xml;q=0.9,*/*;q=0.8', 'HTTP_ACCEPT_CHARSET':
'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'HTTP_ACCEPT_ENCODING':
'gzip,deflate', 'HTTP_ACCEPT_LANGUAGE': 'en-au,en-us;q=0.7,en;q=0.3',
'HTTP_CONNECTION': 'keep-alive', 'HTTP_COOKIE':
'__utma=185464106.1180843268.1233055212.1243482579.1243657150.204;
__utmz=185464106.1242638869.185.34.utmccn=(organic)|utmcsr=google|
utmctr=collect+export+virtual+resources+Puppet|utmcmd=organic;
__utmc=185464106; rbsessionid=80125ff72916ab0bdef7a7d1f57bbfed;
collapsediffs=True', 'HTTP_HOST': 'reviewboard.reductivelabs.com',
'HTTP_KEEP_ALIVE': '300', 'HTTP_USER_AGENT': 'Mozilla/5.0 (Macintosh;
U; Intel Mac OS X 10.5; en-GB; rv:1.9.0.10) Gecko/2009042315 Firefox/
3.0.10', 'PATH_INFO': u'/dashboard/', 'PATH_TRANSLATED': None,
'QUERY_STRING': None, 'REMOTE_ADDR': '203.217.85.205', 'REMOTE_HOST':
None, 'REMOTE_IDENT': None, 'REMOTE_USER': None, 'REQUEST_METHOD':
'GET', 'SCRIPT_NAME': '', 'SERVER_NAME':
'reviewboard.reductivelabs.com', 'SERVER_PORT': 0, 'SERVER_PROTOCOL':
'HTTP/1.1', 'SERVER_SOFTWARE': 'mod_python'}>
view_func
<function dashboard at 0x17f12a8>
* /usr/lib/python2.5/site-packages/ReviewBoard-1.0rc2-py2.5.egg/
reviewboard/accounts/decorators.py in _check_valid_prefs
36. setup by saving their preferences at least once. Redirects
to the
37. preferences URL if they have not.
38. """
39. def _check_valid_prefs(request, *args, **kwargs):
40. try:
41. profile = request.user.get_profile()
42. if profile.first_time_setup_done:
43. return view_func(request, *args, **kwargs) ...
44. except Profile.DoesNotExist:
45. pass
46.
47. return HttpResponseRedirect("%s?%s=%s" %
48. (reverse("user-preferences"),
49. REDIRECT_FIELD_NAME,
▶ Local vars
Variable Value
args
()
kwargs
{}
profile
<Profile: jamtur01>
request
<ModPythonRequest path:/dashboard/, GET:<QueryDict: {}>,
POST:<QueryDict: {}>, COOKIES:{'__utma':
'185464106.1180843268.1233055212.1243482579.1243657150.204', '__utmc':
'185464106', '__utmz': '185464106.1242638869.185.34.utmccn=(organic)|
utmcsr=google|utmctr=collect+export+virtual+resources+Puppet|
utmcmd=organic', 'collapsediffs': 'True', 'rbsessionid':
'80125ff72916ab0bdef7a7d1f57bbfed'}, META:{'AUTH_TYPE': None,
'CONTENT_LENGTH': 0L, 'CONTENT_TYPE': None, 'GATEWAY_INTERFACE': 'CGI/
1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/
xml;q=0.9,*/*;q=0.8', 'HTTP_ACCEPT_CHARSET':
'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'HTTP_ACCEPT_ENCODING':
'gzip,deflate', 'HTTP_ACCEPT_LANGUAGE': 'en-au,en-us;q=0.7,en;q=0.3',
'HTTP_CONNECTION': 'keep-alive', 'HTTP_COOKIE':
'__utma=185464106.1180843268.1233055212.1243482579.1243657150.204;
__utmz=185464106.1242638869.185.34.utmccn=(organic)|utmcsr=google|
utmctr=collect+export+virtual+resources+Puppet|utmcmd=organic;
__utmc=185464106; rbsessionid=80125ff72916ab0bdef7a7d1f57bbfed;
collapsediffs=True', 'HTTP_HOST': 'reviewboard.reductivelabs.com',
'HTTP_KEEP_ALIVE': '300', 'HTTP_USER_AGENT': 'Mozilla/5.0 (Macintosh;
U; Intel Mac OS X 10.5; en-GB; rv:1.9.0.10) Gecko/2009042315 Firefox/
3.0.10', 'PATH_INFO': u'/dashboard/', 'PATH_TRANSLATED': None,
'QUERY_STRING': None, 'REMOTE_ADDR': '203.217.85.205', 'REMOTE_HOST':
None, 'REMOTE_IDENT': None, 'REMOTE_USER': None, 'REQUEST_METHOD':
'GET', 'SCRIPT_NAME': '', 'SERVER_NAME':
'reviewboard.reductivelabs.com', 'SERVER_PORT': 0, 'SERVER_PROTOCOL':
'HTTP/1.1', 'SERVER_SOFTWARE': 'mod_python'}>
view_func
<function dashboard at 0x17f1140>
* /usr/lib/python2.5/site-packages/ReviewBoard-1.0rc2-py2.5.egg/
reviewboard/reviews/views.py in dashboard
302. if view == "watched-groups":
303. # This is special. We want to return a list of groups, not
304. # review requests.
305. grid = WatchedGroupDataGrid(request)
306. else:
307. grid = DashboardDataGrid(request)
308.
309. return grid.render_to_response(template_name) ...
310.
311.
312. @check_login_required
313. def group(request, name, template_name='reviews/
datagrid.html'):
314. """
315. A list of review requests belonging to a particular group.
▶ Local vars
Variable Value
grid
<reviewboard.reviews.datagrids.DashboardDataGrid object at
0x1ae3d50>
request
<ModPythonRequest path:/dashboard/, GET:<QueryDict: {}>,
POST:<QueryDict: {}>, COOKIES:{'__utma':
'185464106.1180843268.1233055212.1243482579.1243657150.204', '__utmc':
'185464106', '__utmz': '185464106.1242638869.185.34.utmccn=(organic)|
utmcsr=google|utmctr=collect+export+virtual+resources+Puppet|
utmcmd=organic', 'collapsediffs': 'True', 'rbsessionid':
'80125ff72916ab0bdef7a7d1f57bbfed'}, META:{'AUTH_TYPE': None,
'CONTENT_LENGTH': 0L, 'CONTENT_TYPE': None, 'GATEWAY_INTERFACE': 'CGI/
1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/
xml;q=0.9,*/*;q=0.8', 'HTTP_ACCEPT_CHARSET':
'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'HTTP_ACCEPT_ENCODING':
'gzip,deflate', 'HTTP_ACCEPT_LANGUAGE': 'en-au,en-us;q=0.7,en;q=0.3',
'HTTP_CONNECTION': 'keep-alive', 'HTTP_COOKIE':
'__utma=185464106.1180843268.1233055212.1243482579.1243657150.204;
__utmz=185464106.1242638869.185.34.utmccn=(organic)|utmcsr=google|
utmctr=collect+export+virtual+resources+Puppet|utmcmd=organic;
__utmc=185464106; rbsessionid=80125ff72916ab0bdef7a7d1f57bbfed;
collapsediffs=True', 'HTTP_HOST': 'reviewboard.reductivelabs.com',
'HTTP_KEEP_ALIVE': '300', 'HTTP_USER_AGENT': 'Mozilla/5.0 (Macintosh;
U; Intel Mac OS X 10.5; en-GB; rv:1.9.0.10) Gecko/2009042315 Firefox/
3.0.10', 'PATH_INFO': u'/dashboard/', 'PATH_TRANSLATED': None,
'QUERY_STRING': None, 'REMOTE_ADDR': '203.217.85.205', 'REMOTE_HOST':
None, 'REMOTE_IDENT': None, 'REMOTE_USER': None, 'REQUEST_METHOD':
'GET', 'SCRIPT_NAME': '', 'SERVER_NAME':
'reviewboard.reductivelabs.com', 'SERVER_PORT': 0, 'SERVER_PROTOCOL':
'HTTP/1.1', 'SERVER_SOFTWARE': 'mod_python'}>
template_name
'reviews/dashboard.html'
view
None
* /usr/lib/python2.5/site-packages/Djblets-0.5rc1-py2.5.egg/
djblets/datagrid/grids.py in render_to_response
549. """
550. return HttpResponse(unicode(self.render_listview()))
551.
552. def render_to_response(self, template_name, extra_context=
{}):
553. """
554. Renders a template containing this datagrid as a context
variable.
555. """
556. self.load_state() ...
557.
558. # If the caller is requesting just this particular grid,
return it.
559. if self.request.GET.get('gridonly', False) and \
560. self.request.GET.get('datagrid-id', None) == self.id:
561. return self.render_listview_to_response()
562.
▶ Local vars
Variable Value
extra_context
{}
self
<reviewboard.reviews.datagrids.DashboardDataGrid object at
0x1ae3d50>
template_name
'reviews/dashboard.html'
* /usr/lib/python2.5/site-packages/Djblets-0.5rc1-py2.5.egg/
djblets/datagrid/grids.py in load_state
445.
446. if profile_dirty:
447. profile.save()
448.
449. self.state_loaded = True
450.
451. # Fetch the list of objects and have it ready.
452. self.precompute_objects() ...
453.
454.
455. def load_extra_state(self, profile):
456. """
457. Loads any extra state needed for this grid.
458.
▶ Local vars
Variable Value
colname
u'last_updated_since'
colnames
[u'new_updates', u'star', u'summary', u'submitter',
u'time_added', u'last_updated_since']
colnames_str

u'new_updates,star,summary,submitter,time_added,last_updated_since'
column
<reviewboard.reviews.datagrids.SummaryColumn object at
0x1781650>
expand_columns
[<reviewboard.reviews.datagrids.SummaryColumn object at
0x1781650>]
expanded_column_width
100
normal_column_width
14
normal_columns
[]
profile
<Profile: jamtur01>
profile_columns_list

u'new_updates,star,summary,submitter,time_added,last_updated_since'
profile_dirty
False
profile_sort_list
u'-last_updated'
self
<reviewboard.reviews.datagrids.DashboardDataGrid object at
0x1ae3d50>
sort_str
u'-last_updated'
total_pct
100
* /usr/lib/python2.5/site-packages/Djblets-0.5rc1-py2.5.egg/
djblets/datagrid/grids.py in precompute_objects
502. try:
503. self.page = self.paginator.page(page_num)
504. except InvalidPage:
505. raise Http404
506.
507. self.rows = []
508.
509. for obj in self.page.object_list: ...
510. self.rows.append({
511. 'object': obj,
512. 'cells': [column.render_cell(obj) for column in
self.columns]
513. })
514.
515. def render_listview(self):
▶ Local vars
Variable Value
base_sort_item
u'last_updated'
db_field
'last_activity_timestamp'
page_num
1
prefix
'-'
query
Error in formatting: invalid literal for int() with base 10:
'T096'
self
<reviewboard.reviews.datagrids.DashboardDataGrid object at
0x1ae3d50>
sort_item
u'-last_updated'
sort_list
['-last_activity_timestamp']
* /usr/lib/python2.5/site-packages/Django-1.0.2_final-py2.5.egg/
django/db/models/query.py in _result_iter
178. upper = len(self._result_cache)
179. while pos < upper:
180. yield self._result_cache[pos]
181. pos = pos + 1
182. if not self._iter:
183. raise StopIteration
184. if len(self._result_cache) <= pos:
185. self._fill_cache() ...
186.
187. def __nonzero__(self):
188. if self._result_cache is not None:
189. return bool(self._result_cache)
190. try:
191. iter(self).next()
▶ Local vars
Variable Value
pos
0
self
[<ReviewRequest: Fix #2230 - Puppetmaster not collecting
exported resources>]
upper
0
* /usr/lib/python2.5/site-packages/Django-1.0.2_final-py2.5.egg/
django/db/models/query.py in _fill_cache
611. """
612. Fills the result cache with 'num' more entries (or until
the results
613. iterator is exhausted).
614. """
615. if self._iter:
616. try:
617. for i in range(num or ITER_CHUNK_SIZE):
618. self._result_cache.append(self._iter.next()) ...
619. except StopIteration:
620. self._iter = None
621.
622. def _next_is_sticky(self):
623. """
624. Indicates that the next filter call and the one following
that should
▶ Local vars
Variable Value
i
1
num
None
self
[<ReviewRequest: Fix #2230 - Puppetmaster not collecting
exported resources>]
* /usr/lib/python2.5/site-packages/Django-1.0.2_final-py2.5.egg/
django/db/models/query.py in iterator
275. for row in self.query.results_iter():
276. if fill_cache:
277. obj, _ = get_cached_row(self.model, row, index_start,
278. max_depth, requested=requested)
279. else:
280. obj = self.model(*row[index_start:])
281. for i, k in enumerate(extra_select):
282. setattr(obj, k, row[i]) ...
283. yield obj
284.
285. def count(self):
286. """
287. Performs a SELECT COUNT() and returns the number of
records as an
288. integer.
▶ Local vars
Variable Value
_
43
extra_select
['shipit_count', 'last_review_timestamp',
'last_activity_timestamp', 'new_review_count']
fill_cache
True
i
2
index_start
4
k
'last_activity_timestamp'
max_depth
1
obj
<ReviewRequest: Fix #1907 (or sort) - 'require' puppet function>
requested
None
row
(0L, None, ' 743-28-27 46:68:63', 0L, 5L, 1L, datetime.datetime
(2009, 5, 30, 18, 5, 28), datetime.datetime(2009, 5, 30, 17, 11, 13),
u'P', 1, None, 1L,
u'<2009053100111...@set.reductivelabs.net>',
datetime.datetime(2009, 5, 30, 17, 11, 13), u" Fix #1907 (or sort) -
'require' puppet function", u" Fix #1907 (or sort) - 'require' puppet
function", u'', u'1907', 5L, u'', 1L, u'admin', u'', u'',
u'rev...@reductivelabs.com',
u'sha1$6d923$9af9786b675e33c6a8ee1fb9a08294ac30a0068a', 1, 1, 1,
datetime.datetime(2009, 5, 30, 18, 58, 45), datetime.datetime(2009, 5,
30, 8, 19, 13), 1L, u'Puppet', u'/opt/git/puppet', u'git://github.com/
reductivelabs/puppet.git', u'', u'', 5L, u'http://
projects.reductivelabs.com/issues/%s', u'', 5L, u'', datetime.datetime
(2009, 5, 30, 18, 5, 28))
self
[<ReviewRequest: Fix #2230 - Puppetmaster not collecting
exported resources>]
* /usr/lib/python2.5/site-packages/ReviewBoard-1.0rc2-py2.5.egg/
reviewboard/reviews/models.py in <lambda>
233.
234.
235. # This is used because the backends may not return a valid
datetime
236. # object when setting this value based on the result of
the
237. # extra() call in ReviewRequestManager.
238. last_activity_timestamp = property(
239. lambda self: self._last_activity_timestamp,
240. lambda self, value: self.__set_last_activity_timestamp
(value)) ...
241.
242.
243. def get_bug_list(self):
244. """
245. Returns a sorted list of bugs associated with this review
request.
246. """
▶ Local vars
Variable Value
self
<ReviewRequest: Fix #1907 (or sort) - 'require' puppet function>
value
' 743-28-27 46:68:63'
* /usr/lib/python2.5/site-packages/ReviewBoard-1.0rc2-py2.5.egg/
reviewboard/reviews/models.py in __set_last_activity_timestamp
475. if siteconfig.get("mail_send_review_mail"):
476. mail_review_request(user, self, changes)
477.
478. def __set_last_activity_timestamp(self, value):
479. if isinstance(value, datetime):
480. self._last_activity_timestamp = value
481. else:
482. self._last_activity_timestamp = typecast_timestamp
(value) ...
483.
484.
485. class Meta:
486. ordering = ['-last_updated', 'submitter', 'summary']
487. unique_together = (('changenum', 'repository'),)
488. permissions = (
▶ Local vars
Variable Value
self
<ReviewRequest: Fix #1907 (or sort) - 'require' puppet function>
value
' 743-28-27 46:68:63'
* /usr/lib/python2.5/site-packages/Django-1.0.2_final-py2.5.egg/
django/db/backends/util.py in typecast_timestamp
81. times = t.split(':')
82. seconds = times[2]
83. if '.' in seconds: # check whether seconds have a
fractional part
84. seconds, microseconds = seconds.split('.')
85. else:
86. microseconds = '0'
87. return datetime.datetime(int(dates[0]), int(dates[1]), int
(dates[2]),
88. int(times[0]), int(times[1]), int(seconds), int(float
('.'+microseconds) * 1000000)) ...
89.
90. def typecast_boolean(s):
91. if s is None: return None
92. if not s: return False
93. return str(s)[0].lower() == 't'
94.
▶ Local vars
Variable Value
d
'743-28-27'
dates
['743', '28', '27']
microseconds
'0'
s
' 743-28-27 46:68:63'
seconds
'63'
t
'46:68:63'
times
['46', '68', '63']
tz
''

Environment: Request Method: GET Request URL: http://reviewboard.reductivelabs.com/dashboard/
Django Version: 1.0.2 final Python Version: 2.5.2 Installed
Applications: ['django.contrib.admin', 'django.contrib.auth',
'django.contrib.contenttypes', 'django.contrib.markup',
'django.contrib.sites', 'django.contrib.sessions', 'djblets.datagrid',
'djblets.feedview', 'djblets.siteconfig', 'djblets.util',
'djblets.webapi', 'reviewboard.accounts', 'reviewboard.admin',
'reviewboard.changedescs', 'reviewboard.diffviewer',
'reviewboard.iphone', 'reviewboard.reports', 'reviewboard.reviews',
'reviewboard.scmtools', 'reviewboard.webapi', 'django_evolution']
Installed Middleware: ('django.middleware.gzip.GZipMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.doc.XViewMiddleware',
'django.middleware.http.ConditionalGetMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'djblets.siteconfig.middleware.SettingsMiddleware',
'reviewboard.admin.middleware.LoadSettingsMiddleware',
'djblets.log.middleware.LoggingMiddleware',
'reviewboard.admin.middleware.CheckUpdatesRequiredMiddleware')
Traceback: File "/usr/lib/python2.5/site-packages/Django-1.0.2_final-
py2.5.egg/django/core/handlers/base.py" in get_response 86. response =
callback(request, *callback_args, **callback_kwargs) File "/usr/lib/
python2.5/site-packages/Djblets-0.5rc1-py2.5.egg/djblets/auth/util.py"
in _checklogin 45. return view_func(request, *args, **kwargs) File "/
usr/lib/python2.5/site-packages/ReviewBoard-1.0rc2-py2.5.egg/
reviewboard/accounts/decorators.py" in _check_valid_prefs 43. return
view_func(request, *args, **kwargs) File "/usr/lib/python2.5/site-
packages/ReviewBoard-1.0rc2-py2.5.egg/reviewboard/reviews/views.py" in
dashboard 309. return grid.render_to_response(template_name) File "/
usr/lib/python2.5/site-packages/Djblets-0.5rc1-py2.5.egg/djblets/
datagrid/grids.py" in render_to_response 556. self.load_state() File "/
usr/lib/python2.5/site-packages/Djblets-0.5rc1-py2.5.egg/djblets/
datagrid/grids.py" in load_state 452. self.precompute_objects() File "/
usr/lib/python2.5/site-packages/Djblets-0.5rc1-py2.5.egg/djblets/
datagrid/grids.py" in precompute_objects 509. for obj in
self.page.object_list: File "/usr/lib/python2.5/site-packages/
Django-1.0.2_final-py2.5.egg/django/db/models/query.py" in
_result_iter 185. self._fill_cache() File "/usr/lib/python2.5/site-
packages/Django-1.0.2_final-py2.5.egg/django/db/models/query.py" in
_fill_cache 618. self._result_cache.append(self._iter.next()) File "/
usr/lib/python2.5/site-packages/Django-1.0.2_final-py2.5.egg/django/db/
models/query.py" in iterator 282. setattr(obj, k, row[i]) File "/usr/
lib/python2.5/site-packages/ReviewBoard-1.0rc2-py2.5.egg/reviewboard/
reviews/models.py" in <lambda> 240. lambda self, value:
self.__set_last_activity_timestamp(value)) File "/usr/lib/python2.5/
site-packages/ReviewBoard-1.0rc2-py2.5.egg/reviewboard/reviews/
models.py" in __set_last_activity_timestamp 482.
self._last_activity_timestamp = typecast_timestamp(value) File "/usr/
lib/python2.5/site-packages/Django-1.0.2_final-py2.5.egg/django/db/
backends/util.py" in typecast_timestamp 88. int(times[0]), int(times
[1]), int(seconds), int(float('.'+microseconds) * 1000000)) Exception
Type: ValueError at /dashboard/ Exception Value: month must be in
1..12

Request information
GET

No GET data
POST

No POST data
COOKIES
Variable Value
__utma
'185464106.1180843268.1233055212.1243482579.1243657150.204'
__utmz
'185464106.1242638869.185.34.utmccn=(organic)|utmcsr=google|
utmctr=collect+export+virtual+resources+Puppet|utmcmd=organic'
__utmc
'185464106'
rbsessionid
'80125ff72916ab0bdef7a7d1f57bbfed'
collapsediffs
'True'
META
Variable Value
AUTH_TYPE
None
CONTENT_LENGTH
0L
CONTENT_TYPE
None
GATEWAY_INTERFACE
'CGI/1.1'
HTTP_ACCEPT
'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'
HTTP_ACCEPT_CHARSET
'ISO-8859-1,utf-8;q=0.7,*;q=0.7'
HTTP_ACCEPT_ENCODING
'gzip,deflate'
HTTP_ACCEPT_LANGUAGE
'en-au,en-us;q=0.7,en;q=0.3'
HTTP_CONNECTION
'keep-alive'
HTTP_COOKIE
'__utma=185464106.1180843268.1233055212.1243482579.1243657150.204;
__utmz=185464106.1242638869.185.34.utmccn=(organic)|utmcsr=google|
utmctr=collect+export+virtual+resources+Puppet|utmcmd=organic;
__utmc=185464106; rbsessionid=80125ff72916ab0bdef7a7d1f57bbfed;
collapsediffs=True'
HTTP_HOST
'reviewboard.reductivelabs.com'
HTTP_KEEP_ALIVE
'300'
HTTP_USER_AGENT
'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-GB; rv:1.9.0.10)
Gecko/2009042315 Firefox/3.0.10'
PATH_INFO
u'/dashboard/'
PATH_TRANSLATED
None
QUERY_STRING
None
REMOTE_ADDR
'203.217.85.205'
REMOTE_HOST
None
REMOTE_IDENT
None
REMOTE_USER
None
REQUEST_METHOD
'GET'
SCRIPT_NAME
''
SERVER_NAME
'reviewboard.reductivelabs.com'
SERVER_PORT
0
SERVER_PROTOCOL
'HTTP/1.1'
SERVER_SOFTWARE
'mod_python'
Settings
Using settings module reviewboard.settings
Setting Value
ABSOLUTE_URL_OVERRIDES
{}
ADMINS
((u'admin', u'revie...@reductivelabs.com'),)
ADMIN_FOR
()
ADMIN_MEDIA_PREFIX
u'/media/admin/'
AD_DOMAIN_CONTROLLER
u''
AD_DOMAIN_NAME
u''
AD_FIND_DC_FROM_DNS
False
AD_GROUP_NAME
u''
AD_OU_NAME
u''
AD_RECURSION_DEPTH
None
AD_SEARCH_ROOT
u''
AD_USE_TLS
False
AJAX_SERIAL
1243656847
ALLOWED_INCLUDE_ROOTS
()
APPEND_SLASH
True
AUTHENTICATION_BACKENDS
('django.contrib.auth.backends.ModelBackend',)
AUTH_PROFILE_MODULE
'accounts.Profile'
BANNED_IPS
()
CACHE_BACKEND
u'memcached://localhost:11211/'
CACHE_EXPIRATION_TIME
2592000
CACHE_MIDDLEWARE_KEY_PREFIX
''
CACHE_MIDDLEWARE_SECONDS
600
COMMENTS_ALLOW_PROFANITIES
False
COMMENTS_BANNED_USERS_GROUP
None
COMMENTS_FIRST_FEW
0
COMMENTS_MODERATORS_GROUP
None
COMMENTS_SKETCHY_USERS_GROUP
None
DATABASE_ENGINE
'mysql'
DATABASE_HOST
'localhost'
DATABASE_NAME
'reviewboard'
DATABASE_OPTIONS
{}
DATABASE_PASSWORD
'********************'
DATABASE_PORT
''
DATABASE_USER
'root'
DATETIME_FORMAT
u'N j, Y, P'
DATE_FORMAT
u'N j, Y'
DEBUG
True
DEBUG_PROPAGATE_EXCEPTIONS
False
DEFAULT_CHARSET
'utf-8'
DEFAULT_CONTENT_TYPE
'text/html'
DEFAULT_FILE_STORAGE
'django.core.files.storage.FileSystemStorage'
DEFAULT_FROM_EMAIL
u'webmaster@localhost'
DEFAULT_INDEX_TABLESPACE
''
DEFAULT_TABLESPACE
''
DISALLOWED_USER_AGENTS
()
DOMAIN_METHOD
u'http'
EMAIL_HOST
u'localhost'
EMAIL_HOST_PASSWORD
'********************'
EMAIL_HOST_USER
u''
EMAIL_PORT
25
EMAIL_SUBJECT_PREFIX
'[Django] '
EMAIL_USE_TLS
False
FILE_CHARSET
'utf-8'
FILE_UPLOAD_HANDLERS
('django.core.files.uploadhandler.MemoryFileUploadHandler',
'django.core.files.uploadhandler.TemporaryFileUploadHandler')
FILE_UPLOAD_MAX_MEMORY_SIZE
2621440
FILE_UPLOAD_PERMISSIONS
None
FILE_UPLOAD_TEMP_DIR
None
FIXTURE_DIRS
()
FORCE_SCRIPT_NAME
''
HTDOCS_ROOT
'/opt/reviewboard.reductivelabs.com/htdocs'
IGNORABLE_404_ENDS
('mail.pl', 'mailform.pl', 'mail.cgi', 'mailform.cgi', 'favicon.ico',
'.php')
IGNORABLE_404_STARTS
('/cgi-bin/', '/_vti_bin', '/_vti_inf')
INSTALLED_APPS
['django.contrib.admin', 'django.contrib.auth',
'django.contrib.contenttypes', 'django.contrib.markup',
'django.contrib.sites', 'django.contrib.sessions', 'djblets.datagrid',
'djblets.feedview', 'djblets.siteconfig', 'djblets.util',
'djblets.webapi', 'reviewboard.accounts', 'reviewboard.admin',
'reviewboard.changedescs', 'reviewboard.diffviewer',
'reviewboard.iphone', 'reviewboard.reports', 'reviewboard.reviews',
'reviewboard.scmtools', 'reviewboard.webapi', 'django_evolution']
INTERNAL_IPS
()
JING_PATH
'/usr/bin/jing'
LANGUAGES
(('en', 'English'),)
LANGUAGES_BIDI
('he', 'ar', 'fa')
LANGUAGE_CODE
u'en-us'
LANGUAGE_COOKIE_NAME
'rblanguage'
LDAP_ANON_BIND_PASSWD
u''
LDAP_ANON_BIND_UID
u''
LDAP_BASE_DN
u''
LDAP_EMAIL_ATTRIBUTE
u''
LDAP_EMAIL_DOMAIN
u''
LDAP_TLS
False
LDAP_UID_MASK
u''
LDAP_URI
u''
LOCALE_PATHS
()
LOCAL_ROOT
'/opt/reviewboard.reductivelabs.com'
LOGGING_ALLOW_PROFILING
False
LOGGING_DIRECTORY
None
LOGGING_ENABLED
False
LOGGING_NAME
'reviewboard'
LOGIN_REDIRECT_URL
'/accounts/profile/'
LOGIN_URL
'/account/login/'
LOGOUT_URL
'/accounts/logout/'
MANAGERS
((u'admin', u'revie...@reductivelabs.com'),)
MEDIA_ROOT
u'/opt/reviewboard.reductivelabs.com/htdocs/media'
MEDIA_SERIAL
1243656860
MEDIA_SERIAL_DIRS
['admin', 'djblets', 'rb']
MEDIA_URL
u'/media/'
MIDDLEWARE_CLASSES
('django.middleware.gzip.GZipMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.doc.XViewMiddleware',
'django.middleware.http.ConditionalGetMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'djblets.siteconfig.middleware.SettingsMiddleware',
'reviewboard.admin.middleware.LoadSettingsMiddleware',
'djblets.log.middleware.LoggingMiddleware',
'reviewboard.admin.middleware.CheckUpdatesRequiredMiddleware')
MONTH_DAY_FORMAT
u'F j'
NIS_EMAIL_DOMAIN
u''
PASSWORD_RESET_TIMEOUT_DAYS
'********************'
PREPEND_WWW
False
PROFANITIES_LIST
'********************'
REVIEWBOARD_ROOT
'/usr/lib/python2.5/site-packages/ReviewBoard-1.0rc2-py2.5.egg/
reviewboard'
ROOT_URLCONF
'djblets.util.rooturl'
SECRET_KEY
'********************'
SEND_BROKEN_LINK_EMAILS
False
SERVER_EMAIL
u'root@localhost'
SESSION_COOKIE_AGE
31536000
SESSION_COOKIE_DOMAIN
None
SESSION_COOKIE_NAME
'rbsessionid'
SESSION_COOKIE_PATH
'/'
SESSION_COOKIE_SECURE
False
SESSION_ENGINE
'django.contrib.sessions.backends.db'
SESSION_EXPIRE_AT_BROWSER_CLOSE
False
SESSION_FILE_PATH
None
SESSION_SAVE_EVERY_REQUEST
False
SETTINGS_MODULE
'reviewboard.settings'
SITE_ID
1
SITE_ROOT
'/'
SITE_ROOT_URLCONF
'reviewboard.urls'
TEMPLATE_CONTEXT_PROCESSORS
('django.core.context_processors.auth',
'django.core.context_processors.debug',
'django.core.context_processors.i18n',
'django.core.context_processors.media',
'django.core.context_processors.request',
'djblets.siteconfig.context_processors.siteconfig',
'djblets.util.context_processors.settingsVars',
'djblets.util.context_processors.siteRoot',
'djblets.util.context_processors.ajaxSerial',
'djblets.util.context_processors.mediaSerial')
TEMPLATE_DEBUG
True
TEMPLATE_DIRS
('/usr/lib/python2.5/site-packages/ReviewBoard-1.0rc2-py2.5.egg/
reviewboard/templates',)
TEMPLATE_LOADERS
('django.template.loaders.filesystem.load_template_source',
'django.template.loaders.app_directories.load_template_source')
TEMPLATE_STRING_IF_INVALID
''
TEST_DATABASE_CHARSET
None
TEST_DATABASE_COLLATION
None
TEST_DATABASE_NAME
None
TEST_RUNNER
'reviewboard.test.runner'
TIME_FORMAT
u'P'
TIME_ZONE
'US/Mountain'
TRANSACTIONS_MANAGED
False
URL_VALIDATOR_USER_AGENT
'Django/1.0.2 final (http://www.djangoproject.com)'
USE_ETAGS
False
USE_I18N
False
WEB_API_ENCODERS
('djblets.webapi.core.BasicAPIEncoder',
'reviewboard.webapi.json.ReviewBoardAPIEncoder')
YEAR_MONTH_FORMAT
u'F Y'

You're seeing this error because you have DEBUG = True in your Django
settings file. Change that to False, and Django will display a
standard 500 page.

Christian Hammond

unread,
May 31, 2009, 3:20:27 AM5/31/09
to revie...@googlegroups.com
Hmm, well, somehow, that review request has a date of "743-28-27", which is quite clearly invalid no matter which way you look at it. Which is the year? Which is the month? None of those are valid months or years. The time is also invalid. Question is, how did this happen? The date seems to be our "last_activity_timestamp," which should be either the review request's last_updated timestamp or the most recent review's timestamp. So I don't know how this would happen. Was this a brand new upgrade, or was this working for a while before now?

I'm working to fully rewrite the last_activity_timestamp generation, which should definitely fix this. I hope to get it into a nightly release in the next couple of days, followed by RC3.


Christian

--
Christian Hammond - chi...@chipx86.com
Review Board - http://www.review-board.org
VMware, Inc. - http://www.vmware.com


James Turnbull

unread,
May 31, 2009, 3:36:36 AM5/31/09
to revie...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Christian Hammond wrote:
> Hmm, well, somehow, that review request has a date of "743-28-27", which
> is quite clearly invalid no matter which way you look at it. Which is
> the year? Which is the month? None of those are valid months or years.
> The time is also invalid. Question is, how did this happen? The date
> seems to be our "last_activity_timestamp," which should be either the
> review request's last_updated timestamp or the most recent review's
> timestamp. So I don't know how this would happen. Was this a brand new
> upgrade, or was this working for a while before now?

Brand new install. I just handed it over to a developer who started
testing by adding some reviews. After he added one or two reviews I got
the 500 error.

> I'm working to fully rewrite the last_activity_timestamp generation,
> which should definitely fix this. I hope to get it into a nightly
> release in the next couple of days, followed by RC3.

Thanks! I presume upgrades are easy?

Regards

James Turnbull
- --
Author of:
* Pro Linux Systems Administration
(http://www.amazon.com/gp/product/1430219122/)
* Pulling Strings with Puppet
(http://www.amazon.com/gp/product/1590599780/)
* Pro Nagios 2.0
(http://www.amazon.com/gp/product/1590596099/)
* Hardening Linux
(http://www.amazon.com/gp/product/1590594444/)

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFKIjOD9hTGvAxC30ARAg9wAJ4242aLtU0DlbWIHaqIHFV7nzpepACgqiaO
fdcTvhkbOhq0peRbYBn4d7k=
=CIE1
-----END PGP SIGNATURE-----

Christian Hammond

unread,
May 31, 2009, 3:39:02 AM5/31/09
to revie...@googlegroups.com
Sorry you're hitting this. I don't know what's causing it and certainly haven't seen this particular error myself, but this code is flawed anyway and I do want to replace it ASAP.

Upgrades are really easy. It boils down to:

   $ easy_install -U ReviewBoard
   $ rb-site upgrade /path/to/site
   $ /etc/init.d/apache2 restart


Christian

--
Christian Hammond - chi...@chipx86.com
Review Board - http://www.review-board.org
VMware, Inc. - http://www.vmware.com


Reply all
Reply to author
Forward
0 new messages