'>' not supported between instances of 'NoneType' and 'int' - bug in 3.2.9?

Hi all. I see this sometimes in indico.log, running Indico 3.2.9:

2024-04-02 10:23:24,823  ERROR    69c0b9f6f5934acb  -       indico.flask              '>' not supported between instances of 'NoneType' and 'int'
Traceback (most recent call last):
  File "/opt/indico/.venv/lib/python3.9/site-packages/flask/app.py", line 1484, in full_dispatch_request
    rv = self.dispatch_request()
  File "/opt/indico/.venv/lib/python3.9/site-packages/flask/app.py", line 1469, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
  File "/opt/indico/.venv/lib/python3.9/site-packages/indico/web/http_api/handlers.py", line 234, in handler
    if ttl > 0:
TypeError: '>' not supported between instances of 'NoneType' and 'int'

Not sure what I need to do to trigger it, but should I just raise this as a bug?

thanks

saving the http api settings (set the cache ttl to 0) in the admin ui should fix it

Ah, OK thanks.

Not sure how you got that None there btw. The code to configure those settings has not been touch for the last 9 years, and neither is the default None nor does the form field allow entering None (e.g. by providing an empty/invalid value).

Dunno, it is a very old system, pre-dating any of the current personnel! I was just glad to get it off Ubuntu 16.04, but I think it was on another server before that.

I can see on our old test system, the settings show as empty.

Ubuntu 16… ouch!

PS: If you are on a modern distribution now, you may want to use the opportunity to upgrade to Indico v3.3 (and Python 3.12) since on modern distributions that upgrade is pretty straightforward!

Yep, will do - we’re now Debian 12. After our 2.3.2->3.2.9 upgrade last Thursday afternoon, I’m spending my time just watching things to make sure it all works fine. Hence my flurry of other questions today. :slight_smile: The DNS one is odd though.

The 3.2.9->3.3.x upgrade will happen soon though.