Skip to content

FeedParseError: Unable to parse text as xml documents #200

@ahloiscreamo

Description

@ahloiscreamo

Hello!

So i just install castero on pip, i went ahead to start it, then i proceed to add feed by providing my path /home/ahloi/Downloads/Rss after that it output error as the title suggested.

I only have 1 opml file on the directory, which i got from Lex Fridman Podcast.

im using artix linux, Python 3.10.8,

output on terminal

❯ ./castero --import /home/ahloi/Downloads/Rss/
Traceback (most recent call last):
  File "/home/ahloi/.local/lib/python3.10/site-packages/castero/subscriptions.py", line 49, in load
    self._tree = etree.parse(path)
  File "src/lxml/etree.pyx", line 3538, in lxml.etree.parse
  File "src/lxml/parser.pxi", line 1876, in lxml.etree._parseDocument
  File "src/lxml/parser.pxi", line 1902, in lxml.etree._parseDocumentFromURL
  File "src/lxml/parser.pxi", line 1805, in lxml.etree._parseDocFromFile
  File "src/lxml/parser.pxi", line 1177, in lxml.etree._BaseParser._parseDocFromFile
  File "src/lxml/parser.pxi", line 615, in lxml.etree._ParserContext._handleParseResultDoc
  File "src/lxml/parser.pxi", line 725, in lxml.etree._handleParseResult
  File "src/lxml/parser.pxi", line 654, in lxml.etree._raiseParseError
  File "/home/ahloi/Downloads/Rss/", line 1
lxml.etree.XMLSyntaxError: Document is empty, line 1, column 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/ahloi/.local/bin/castero", line 5, in <module>
    from castero.__main__ import main
  File "/home/ahloi/.local/lib/python3.10/site-packages/castero/__main__.py", line 149, in <module>
    main()
  File "/home/ahloi/.local/lib/python3.10/site-packages/castero/__main__.py", line 96, in main
    import_subscriptions(vars(args)["import"], database)
  File "/home/ahloi/.local/lib/python3.10/site-packages/castero/__main__.py", line 29, in import_subscriptions
    subscriptions.load(path)
  File "/home/ahloi/.local/lib/python3.10/site-packages/castero/subscriptions.py", line 53, in load
    raise SubscriptionsParseError("Unable to parse text as an XML document")
castero.subscriptions.SubscriptionsParseError: Unable to parse text as an XML document
~/.local/bin
❯ 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions