davidswelt / zot_bib_web

Create interactive web bibliographies based on Zotero collections
163 stars 19 forks source link

push.py ExpatError #12

Closed TimBMK closed 5 years ago

TimBMK commented 5 years ago

I'm trying to get Zot Bib Web running on my Wordpress installation. While the generation of zotero-bib.html works fine, I'm running into trouble with push.py.

I'm getting the error

Traceback (most recent call last):
  File "Zot Bib Web/push.py", line 94, in <module>
    rawpost = server.wp.getPost(wp_blogid, wp_username, wp_password, post_id)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1243, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1602, in __request
    verbose=self.__verbose
  File "/usr/lib/python2.7/xmlrpclib.py", line 1283, in request
    return self.single_request(host, handler, request_body, verbose)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1316, in single_request
    return self.parse_response(response)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1487, in parse_response
    p.feed(data)
  File "/usr/lib/python2.7/xmlrpclib.py", line 558, in feed
    self._parser.Parse(data, 0)
xml.parsers.expat.ExpatError: mismatched tag: line 16, column 4

when running the script. Line 94 in push.py points to the rawpost generation, so I'm guessing something is running out of line there - but I can't seem to figure out what. These are my setting for push_wordpress in settings.py:

push_wordpress(url="http://..../httpdocs/xmlrpc.php", blogID=1, user="user", password="pass", postID=360)

With the url pointing to xmlrpc on the server and the postID identifying the page where the bibliography should be displayed (user and pass being the correct credentials, of course), I'm not sure what is going wrong.

According to the Python2 docs, the "mismatched tag" error indicates that "An end tag did not match the innermost open start tag." (https://docs.python.org/2/library/pyexpat.html#expat-error-constants). However, I do not know how to fix this from within the given scripts from Zot Bib Web. Any help would be appreciated!

davidswelt commented 5 years ago

This looks like an error in the version of xmlrpclib you have installed and the WordPress that is used for your website. The stack trace you sent indicates that clearly. So that's who you need to take this up with.