[xml2rfc] [Bug]: AttributeError: module 'cgi' has no attribute 'escape'

Antonin Décimo <antonin.decimo@gmail.com> Mon, 23 December 2019 11:00 UTC

Return-Path: <antonin.decimo@gmail.com>
X-Original-To: xml2rfc@ietfa.amsl.com
Delivered-To: xml2rfc@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id C76DE12007C for <xml2rfc@ietfa.amsl.com>; Mon, 23 Dec 2019 03:00:42 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.999
X-Spam-Level:
X-Spam-Status: No, score=-1.999 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ToBTKoNJpYwG for <xml2rfc@ietfa.amsl.com>; Mon, 23 Dec 2019 03:00:40 -0800 (PST)
Received: from mail-ot1-x335.google.com (mail-ot1-x335.google.com [IPv6:2607:f8b0:4864:20::335]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id D40FD12001E for <xml2rfc@ietf.org>; Mon, 23 Dec 2019 03:00:40 -0800 (PST)
Received: by mail-ot1-x335.google.com with SMTP id d7so17279110otf.5 for <xml2rfc@ietf.org>; Mon, 23 Dec 2019 03:00:40 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to :content-transfer-encoding; bh=n4q78lFavp286KyBD6uIrCkMRfxyU6L6pip6JwbdbrI=; b=n68QB8AKmhrOpYai5U8f7SAFiEKpor7ZanDccLrgC+nzZ6Q9LZ6D390hMQZLxEfrqQ 3pprT1or+AaHYltDB2nHA7uOWA93gKY2hRrVZ7MHy1wa87sRrYC51UTY3VdNt/tp7tRl OPulaAHbI15iZSw/dkLYer+/MYVBLMr2X8B38nmi+1S9NkE+Jw/j88ndxiqxuJWiJZak rsgzD8azxOYJ/mC5f9QyJi9A2J3CTtl9HNZFj72jgEipdS5iFwRvGQHaM970Ch3kXrC/ ImRQHHbUUvVFFPM2FY8Da7juXJAG1FqeVvltZUe5dLOkS+w0URqB0MKXpO8wDTWZa+tI xNmQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to :content-transfer-encoding; bh=n4q78lFavp286KyBD6uIrCkMRfxyU6L6pip6JwbdbrI=; b=O007uOQbhzC3yaDQPGjMNBO4KYiDH73fNkwDq89UGarXxp81RHsmlL6lVJ5irq/lsW Wvule0xCd0bAwmRQDNB/K/xdfLDrholl6O5M7GeK6vfLmOZUnWHyHTiVtxfNmJXkLFyO JxLQSpCg5mjmAmjw3jCghv0kqMJ3wM5Hke1gDAVZ7C1QC4ot2PQfabNacOxsDvd09YOA Lse2KJDMnJZMwPm1mcu55vLQfKhqCGc5hXmIZ1INho8N93P+d8oTz+oYP0VPX9H2u8Si mIXLJbCTkJIXR38uSfvD336KCDLrE5b0a88yzUw4yCXmOZB+heobOhL2q01oQfEx6P5u W2zw==
X-Gm-Message-State: APjAAAVprtete41m27AHD2R8qridWkyPJwGFEvUUOJ0pmnC3A2QAx4WP 9+zh/l8ZCTTmkJNPMdmh2U0I9Ohv+IqL9CS74prqodtz
X-Google-Smtp-Source: APXvYqwsIJ2SLzWN9OdVpfM2ZUMAYoARvFJW+uXkG9DTOj5Ve+tJ00eLKEG4tzzoa/An2hsPNtr6QNcGBLDJatzjnmc=
X-Received: by 2002:a05:6830:1f89:: with SMTP id v9mr30431209otr.90.1577098839916; Mon, 23 Dec 2019 03:00:39 -0800 (PST)
MIME-Version: 1.0
From: Antonin Décimo <antonin.decimo@gmail.com>
Date: Mon, 23 Dec 2019 12:00:31 +0100
Message-ID: <CAC=54BK6hxidy+dDLHM9o0A4kt=fZaikQT9et4+jQ0MUdoAbHw@mail.gmail.com>
To: xml2rfc@ietf.org
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/xml2rfc/sKLZk-K6o_gavblxlDmyhr17_iA>
Subject: [xml2rfc] [Bug]: AttributeError: module 'cgi' has no attribute 'escape'
X-BeenThere: xml2rfc@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: <xml2rfc.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/xml2rfc>, <mailto:xml2rfc-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/xml2rfc/>
List-Post: <mailto:xml2rfc@ietf.org>
List-Help: <mailto:xml2rfc-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/xml2rfc>, <mailto:xml2rfc-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 23 Dec 2019 11:00:43 -0000

Hello,

I got this crash when generating html. I'm using Arch Linux, I
installed xml2rfc from pip. Text and pdf generation works fine.

    $ xml2rfc --html draft-ietf-babel-hmac.xml
    Traceback (most recent call last):
      File "/home/antonin/.local/bin/xml2rfc", line 11, in <module>
        load_entry_point('xml2rfc==2.37.3', 'console_scripts', 'xml2rfc')()
      File "/home/antonin/.local/lib/python3.8/site-packages/xml2rfc/run.py",
line 504, in main
        htmlwriter.write(filename)
      File "/home/antonin/.local/lib/python3.8/site-packages/xml2rfc/writers/base.py",
line 1441, in write
        self.post_rendering()
      File "/home/antonin/.local/lib/python3.8/site-packages/xml2rfc/writers/legacy_html.py",
line 830, in post_rendering
        'docName':         cgi.escape(docName, quote=True),
    AttributeError: module 'cgi' has no attribute 'escape'

Thanks to some googling, a possible fix can be found here:
https://github.com/jupyter/nbconvert/commit/1aa14e34ce5b7aa13ef7480216daa3f9a824766f

It would be nice to have a link to the bug tracker on the homepage, or
to mention where bugs are to be reported.

Thanks,

-- Antonin Décimo