Giter Site home page Giter Site logo

Comments (5)

kennedyshead avatar kennedyshead commented on September 26, 2024 1

Fast fix for now would be running apt-get install libexpat1=2.2.9-1build1 libexpat1-dev=2.2.9-1build1, The bug originates from libexpat

from python-aio-georss-client.

kennedyshead avatar kennedyshead commented on September 26, 2024

Ymagis/ClairMeta#212

from python-aio-georss-client.

exxamalte avatar exxamalte commented on September 26, 2024

Thanks for the analysis.
I was just able to reproduce this on Ubuntu 21.10 which has libexpat1 version 2.4.1-2ubuntu0.1 installed.

$ python3 -c 'import xmltodict; print(xmltodict.parse("<?xml version=\"1.0\" encoding=\"UTF-8\"?><rss xmlns:geo=\"http://www.w3.org/2003/01/geo/wgs84_pos#\" version=\"2.0\"><channel><item><title>Title 1</title></item></channel></rss>", process_namespaces=True))'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/malte/.local/lib/python3.9/site-packages/xmltodict.py", line 327, in parse
    parser.Parse(xml_input, True)
xml.parsers.expat.ExpatError: out of memory: line 1, column 0

And, after adding namespace_separator=" ":

$ python3 -c 'import xmltodict; print(xmltodict.parse("<?xml version=\"1.0\" encoding=\"UTF-8\"?><rss xmlns:geo=\"http://www.w3.org/2003/01/geo/wgs84_pos#\" version=\"2.0\"><channel><item><title>Title 1</title></item></channel></rss>", process_namespaces=True, namespace_separator=" "))'
OrderedDict([('rss', OrderedDict([('@version', '2.0'), ('@xmlns', OrderedDict([('geo', 'http://www.w3.org/2003/01/geo/wgs84_pos#')])), ('channel', OrderedDict([('item', OrderedDict([('title', 'Title 1')]))]))]))])

from python-aio-georss-client.

exxamalte avatar exxamalte commented on September 26, 2024

It seems that a new change in the libexpat library will fix this issue, planned for version 2.4.7: libexpat/libexpat#577

from python-aio-georss-client.

kennedyshead avatar kennedyshead commented on September 26, 2024

Closing, seems to be solved

from python-aio-georss-client.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.