#231 Koji (koji-web) fails in Fedora 25 with DateTime instance has no attribute 'rfind'
Closed: Fixed 7 years ago Opened 7 years ago by amessina.

File "/usr/share/koji-web/scripts/wsgi_publisher.py", line 387, in handle_request
result = func(environ, **data)
File "/usr/share/koji-web/scripts/index.py", line 317, in index
return _genHTML(environ, 'index.chtml')
File "/usr/share/koji-web/lib/kojiweb/util.py", line 147, in _genHTML
return tmpl_inst.respond().encode('utf-8', 'replace')
File "index_chtml.py", line 151, in respond
File "/usr/lib/python2.7/site-packages/koji/__init__.py", line 2419, in formatTime
dotidx = value.rfind('.')
AttributeError: DateTime instance has no attribute 'rfind'

I suppose I could git it a try if you're interested in merging it for the next release. Is that what you're wondering? ;)

@mikem, I can confirm that applying your patch https://pagure.io/fork/mikeb/koji/c/676db88a8bd4c729278ef4594c9174be5b554b2f (and removing PyGreSQL for good measure) resolves the issue on a Fedora 25 installation.

@mikem, I can confirm that applying your patch https://pagure.io/fork/mikeb/koji/c/676db88a8bd4c729278ef4594c9174be5b554b2f (and removing PyGreSQL for good measure) resolves the issue on a Fedora 25 installation.

Thanks!
That patch needs more testing, but I think it might be the way we need to go now. It looks like PyGreSQL introduced many incompatible changes in 5.0.

Reproducible for me as well, koji-web falis with this (and other) errors when talking to hub deployed on Fedora 25. Combination of hub/f24 and web/f25 works fine.

@mikem Are we going to fix these issues with PyGreSQL or migrate to psycopg2?

I've tested the psycopg2 patch from @mikeb (rebased to 1.11.0 by @ngompa) and it fixes the problem on Fedora 25.

There may be some corner issues with the psychopg2 patch, so beware

I've opened PR #240 for discussion about psycopg2 solution.

@mikem changed the status to Closed

7 years ago

Metadata Update from @tkopecek:
- Issue set to the milestone: 1.12

6 years ago

Login to comment on this ticket.

Metadata