Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

code from example.py in Jupyter gives XMLSyntaxError #16

Closed
JJWTimmer opened this issue Aug 29, 2019 · 2 comments
Closed

code from example.py in Jupyter gives XMLSyntaxError #16

JJWTimmer opened this issue Aug 29, 2019 · 2 comments
Assignees

Comments

@JJWTimmer
Copy link

Hi,
I just pulled and ran the docker image with the webserver, and found Jupyter running on http://localhost:8080/lab
I pasted the code from the example.py in the cell and was presented with the following exception:

from __future__ import print_function, unicode_literals
​
from frog import Frog, FrogOptions
​
fx = Frog(FrogOptions(parser=True,xmlout=True))
output = fx.process("Dit is een FoLiA test.")
Traceback (most recent call last):

  File "/usr/local/lib/python3.5/dist-packages/IPython/core/interactiveshell.py", line 3296, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)

  File "<ipython-input-1-21794a31267e>", line 6, in <module>
    output = fx.process("Dit is een FoLiA test.")

  File "frog_wrapper.pyx", line 190, in frog.Frog.process

  File "/usr/local/lib/python3.5/dist-packages/folia/main.py", line 7165, in __init__
    self.tree = xmltreefromstring(kwargs['string'])

  File "/usr/local/lib/python3.5/dist-packages/folia/main.py", line 522, in xmltreefromstring
    return ElementTree.parse(BytesIO(s), ElementTree.XMLParser(collect_ids=False))

  File "src/lxml/etree.pyx", line 3435, in lxml.etree.parse

  File "src/lxml/parser.pxi", line 1857, in lxml.etree._parseDocument

  File "src/lxml/parser.pxi", line 1877, in lxml.etree._parseMemoryDocument

  File "src/lxml/parser.pxi", line 1765, in lxml.etree._parseDoc

  File "src/lxml/parser.pxi", line 1127, in lxml.etree._BaseParser._parseDoc

  File "src/lxml/parser.pxi", line 601, in lxml.etree._ParserContext._handleParseResultDoc

  File "src/lxml/parser.pxi", line 711, in lxml.etree._handleParseResult

  File "src/lxml/parser.pxi", line 640, in lxml.etree._raiseParseError

  File "<string>", line 1
XMLSyntaxError: Start tag expected, '<' not found, line 1, column 1

Hellup? :)

@proycon
Copy link
Owner

proycon commented Aug 30, 2019

This looks very much like an error that was fixed recently. Considering the new releases yesterday there's going to be a new LaMachine docker image later today. I hope that will fix it already.

@proycon proycon self-assigned this Aug 30, 2019
@proycon
Copy link
Owner

proycon commented Sep 1, 2019

This was in instance of #11. The LaMachine docker image has been updated again now so this should be fixed hopefully. (let me know if not)

@proycon proycon closed this as completed Sep 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants