donnemartin/gitsome

Syntaxerror when parsing received XML

Closed this issue · 2 comments

Arch Linux, Python 3.5.1, zsh 5.2, gitsome 0.5.0, pip 8.1.2

Error:

Traceback (most recent call last):
  File "/usr/bin/gh", line 9, in <module>
    load_entry_point('gitsome==0.5.0', 'console_scripts', 'gh')()
  File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 542, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2569, in load_entry_point
    return ep.load()
  File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2229, in load
    return self.resolve()
  File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2235, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/lib/python3.5/site-packages/gitsome/main_cli.py", line 20, in <module>
    from .githubcli import GitHubCli
  File "/usr/lib/python3.5/site-packages/gitsome/githubcli.py", line 23, in <module>
    from .github import GitHub
  File "/usr/lib/python3.5/site-packages/gitsome/github.py", line 31, in <module>
    import feedparser
  File "/usr/lib/python3.5/site-packages/feedparser.py", line 188, in <module>
    xml.sax.make_parser(PREFERRED_XML_PARSERS) # test for valid parsers
  File "/usr/lib/python3.5/xml/sax/__init__.py", line 80, in make_parser
    return _create_parser(parser_name)
  File "/usr/lib/python3.5/xml/sax/__init__.py", line 104, in _create_parser
    drv_module = __import__(parser_name,{},{},['create_parser'])
  File "/usr/lib/python3.5/site-packages/drv_libxml2.py", line 75, in <module>
    import libxml2
  File "/usr/lib/python3.5/site-packages/libxml2.py", line 9326
    XML_CHAR_ENCODING_ASCII XML_T
                                ^
SyntaxError: invalid syntax

I tried reinstalling, but same error. I get this with any command, and even if I try to do autocompletion. I had already added the ZSH compatibility line:

autoload bashcompinit
bashcompinit
source $HOME/dotfiles/tools/gh_complete.sh

What's weird, is that it did work for like a day, when I first installed it maybe a few days ago. Tried it now, and doesn't work. I'd say it might be a breaking change for some XML parser or for the Github API, but I dunno.

Oh! Turns out it was an error with the XML library which was just released a patch. Seems to be working fine now

Ah, glad to hear it's working now. Thanks for the follow-up!