Bug report

7 views
Skip to first unread message

Tom Regan

unread,
Apr 26, 2022, 8:37:01 AM4/26/22
to MyTownGovernment Users Forum
Hi Joshua.

Quick bug report:

When posting a new meeting, if the date is incorrectly entered (e.g. "5/32022" instead of "5/3/2022") the scheduling attempt generates an unhanded error in the python code. 

Traceback text:
Traceback (most recent call last): File "/base/alloc/tmpfs/dynamic_runtimes/python27g/a4bfb6384cd1e348/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1535, in __call__ rv = self.handle_exception(request, response, e) File "/base/alloc/tmpfs/dynamic_runtimes/python27g/a4bfb6384cd1e348/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1529, in __call__ rv = self.router.dispatch(request, response) File "/base/alloc/tmpfs/dynamic_runtimes/python27g/a4bfb6384cd1e348/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1278, in default_dispatcher return route.handler_adapter(request, response) File "/base/alloc/tmpfs/dynamic_runtimes/python27g/a4bfb6384cd1e348/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1102, in __call__ return handler.dispatch() File "/base/alloc/tmpfs/dynamic_runtimes/python27g/a4bfb6384cd1e348/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 572, in dispatch return self.handle_exception(e, self.app.debug) File "/base/alloc/tmpfs/dynamic_runtimes/python27g/a4bfb6384cd1e348/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 570, in dispatch return method(*args, **kwargs) File "/base/data/home/apps/s~towngovernment-hr/61.442254565577144014/main.py", line 2218, in post meeting.time = datetime.datetime(getYear(date[2]), getNumber(date[0]), getNumber(date[1]), hour, getNumber(time[1]), 0, 0, board.region().tz) IndexError: list index out of range

Not a big deal, but it took me a few minutes to find the typo that caused the error and correct it.  I suspect users who are less familiar with Python and troubleshooting would prefer that the code catch that exception and warn them that their date doesn't look right. 
Reply all
Reply to author
Forward
0 new messages