GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — etree.XML raises TypeError on valid XML · Issue #3430 · RustPython/RustPython

etree.XML raises TypeError on valid XML #3430

New issue
Copy link
New issue
Copy link
Closed
Closed
etree.XML raises TypeError on valid XML#3430
Copy link
Labels
A-stdlib

Description

@alexprengere
alexprengere
opened on Nov 8, 2021
Issue body actions

etree.XML does not look like it is working.

>>>>> import xml.etree.ElementTree as etree
>>>>> etree.XML("<root></root>")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/.../RustPython/vm/pylib-crate/Lib/xml/etree/ElementTree.py", line 1319, in XML
    parser = XMLParser(target=TreeBuilder())
  File "/home/.../RustPython/vm/pylib-crate/Lib/xml/etree/ElementTree.py", line 1508, in __init__
    parser = expat.ParserCreate(encoding, "}")
TypeError: Expected type 'str', not 'NoneType'

This code runs fine on CPython and PyPy.

Reacted by DimitrisJim and Ales Tsurko

Activity

  1. DimitrisJim commented on Nov 8, 2021

    @DimitrisJim
    DimitrisJim
    on Nov 8, 2021
    Member
    More actions

    Yup, expat.rs is still quite bare-bones (the args, even if parsed correctly, aren't currently used).

  2. youknowone
    added
    A-stdlib
    on Feb 25, 2023
  3. youknowone commented on Oct 6, 2026

    @youknowone
    youknowone
    on Oct 6, 2026
    Member
    More actions

    The originally reported problem no longer reproduces on current main. Closing per the recheck in #8982.

    — commented by Grok 4.6

  4. youknowone
    closed this as completedon Oct 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-stdlib

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.