tamentis / cartman

Command line Trac tools
http://tamentis.com/projects/cartman/
ISC License
22 stars 10 forks source link

comment: error: unable to fetch timestamp -- WARNING: Untested Trac version (1.4) #36

Closed strk closed 1 year ago

strk commented 2 years ago

I cannot comment on a ticket with Trac version 1.4, this is what happens:

WARNING: Untested Trac version (1.4)
error: unable to fetch timestamp
strk commented 2 years ago

The target trac instance is trac.osgeo.org - if it helps testing

strk commented 2 years ago

Reading the code it looks like this bug is not related to trac version but rather to some kind of theme. This is because Cartman looks for a start_time string in the HTML, and I DO see that string here: https://trac.edgewall.org/ticket/8813 while I dont' see it here: https://trac.osgeo.org/osgeo/ticket/2759

In both pages I do find a Powered By Trac 1.4.3 so the difference is elsewhere (custom theme?)

MFreeze commented 1 year ago

It's been a while now, but you can solve the problem by replacing:

    regex = r"""name="{}" value="([^"]+)""".format(token)

in text.extract_timestamps_common by

    regex = r"""name="{}"\s*value="([^"]+)""".format(token)
strk commented 1 year ago

Thanks, that works. PR ready #37