• Re: UDD python3 transition

    From Alexandre Detiste@21:1/5 to All on Sun Oct 30 19:10:01 2022
    https://udd.debian.org/cgi-bin/[email protected]&tag=cruft
    is broken

    Is it also possible to get this info in raw json or xml or something ?
    (it's not that hard to parse anyway)

    I found python3-debianbts that calls the SOAP api.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Alexandre Detiste@21:1/5 to All on Sun Oct 30 19:00:01 2022
    Hi,

    This page broke recently.

    Is it also possible to get this info in raw json or xml or something ?
    (it's not that hard to parse anyway)

    https://udd.debian.org/cgi-bin/[email protected]&tag=cruft

    AttributeErrorPython 3.9.2: /usr/bin/python3
    Sun Oct 30 17:28:34 2022

    A problem occurred in a Python script. Here is the sequence of
    function calls leading up to the error, in the order they occurred.

    /srv/udd.debian.org/udd/web/cgi-bin/bts-usertags.cgi in <module>
    314 index()
    315
    316
    317 if __name__ == '__main__':
    318 main()
    main = <function main>
    /srv/udd.debian.org/udd/web/cgi-bin/bts-usertags.cgi in main()
    306 by_user(user)
    307 elif '%' not in user and '%' not in tag:
    308 tagged_bugs(user, tag)
    309 else:
    310 search_result(user, tag)
    global tagged_bugs = <function tagged_bugs>, user = '[email protected]', tag = 'cruft'
    /srv/udd.debian.org/udd/web/cgi-bin/bts-usertags.cgi in tagged_bugs(user='[email protected]', tag='cruft')
    212 + result.package,
    213 },
    214 cgi.escape(result.title),
    215 '<a href="?bug=%s">list usertags</a>' % result.id,
    216 attrs=attrs)
    global cgi = <module 'cgi' from '/usr/lib/python3.9/cgi.py'>,
    cgi.escape undefined, result = {'id': 769895, 'package': 'init-system-helpers',...e timestamps on timer unit purge', 'done':
    False}, result.title = 'init-system-helpers: deb-systemd-helper should
    remove timestamps on timer unit purge'

    AttributeError: module 'cgi' has no attribute 'escape'
    args = ("module 'cgi' has no attribute 'escape'",)
    with_traceback = <built-in method with_traceback of AttributeError object>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lucas Nussbaum@21:1/5 to Alexandre Detiste on Mon Oct 31 15:00:01 2022
    Hi,

    On 30/10/22 at 18:52 +0100, Alexandre Detiste wrote:
    https://udd.debian.org/cgi-bin/[email protected]&tag=cruft
    is broken

    I fixed it. thanks for the report.

    Is it also possible to get this info in raw json or xml or something ? (it's not that hard to parse anyway)

    This is not supported by that script, no. You could use SQL to query the
    DB directly.

    Lucas

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Alexandre Detiste@21:1/5 to All on Mon Oct 31 23:10:01 2022
    Fixed

    Thanks

    Is it also possible to get this info in raw json or xml or something ? (it's not that hard to parse anyway)

    This is not supported by that script, no. You could use SQL to query the
    DB directly.

    I used python3-debianbts, which is also convenient to get the body
    of the messages I then parse with a regexp and also to recurse through
    merge bugs.

    So I wrote a spider for Halloween (that's the joke...)

    But this spider should not be included in user-facing package
    that are going to hammer the BTS, only it's result.

    Is there a good spot on Debian infrastructure to store this tiny piece
    of precalculated text file ? (https://raw.githubusercontent.com/a-detiste/cruft-ng/master/bugs feels wrong)

    Greetings

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)