NameError: name 'timedelta' is not defined
Bug #2093275 reported by
Benjamin Drung
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ubuntu-sponsoring |
Fix Released
|
Critical
|
Simon Quigley |
Bug Description
Generating the report fails after commit https:/
```
Traceback (most recent call last):
File "/usr/bin/
load_
File "/usr/lib/
generate_page(
File "/usr/lib/
subst[
NameError: name 'timedelta' is not defined
```
Changed in ubuntu-sponsoring: | |
status: | New → Fix Released |
assignee: | nobody → Simon Quigley (tsimonq2) |
importance: | Undecided → Critical |
To post a comment you must log in.
It fails now with:
``` sponsoring. sponsors_ page -v bdrung/ projects/ ubuntu- sponsoring/ ubuntu_ sponsoring/ sponsors_ page.py" , line 929, in <module> bdrung/ projects/ ubuntu- sponsoring/ ubuntu_ sponsoring/ sponsors_ page.py" , line 906, in main bdrung/ projects/ ubuntu- sponsoring/ ubuntu_ sponsoring/ sponsors_ page.py" , line 746, in generate_page "AGEAVERAGE" ] = str((sum( (x.date_ queued for x in items), datetime. timedelta( )) / len(items)))
^^^^ ^^^^^^^ ^^^^^^^ ^^^^^^^ ^^^^^^^ ^^^^^^^ ^^^^^^^ ^^^^^^^ ^^^^
$ python3 -m ubuntu_
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/home/
main()
File "/home/
generate_page(
File "/home/
subst[
TypeError: unsupported operand type(s) for +: 'datetime.datetime' and 'datetime.datetime'
```