Kattis / problemtools

Tools to manage problem packages using the Kattis problem package format.
MIT License
101 stars 70 forks source link

problem2html crashing #219

Closed bandgeekdante closed 1 year ago

bandgeekdante commented 1 year ago

I'm getting the following error message when running problem2html after updating problemtools:

Traceback (most recent call last):
  File "/usr/local/bin/problem2html", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.8/dist-packages/problemtools/problem2html.py", line 140, in main
    convert(options.problem, options)
  File "/usr/local/lib/python3.8/dist-packages/problemtools/problem2html.py", line 43, in convert
    tex = plasTeX.TeX.TeX(**{argname: texfile})
TypeError: __init__() got an unexpected keyword argument 'myfile'

I've never seen this before and it happens with all problem directories, including past contest problems that used to compile perfectly into HTML. Within verifyproblem, this shows up as

ERROR in problem statement: Could not convert problem statement to html for language "".  Run problem2html  on the problem to diagnose.

I have plasTeX version 2.1, and this problem likely comes from 5208a609fff4c2f8541c6f639a4a414f20dfed11

simonlindholm commented 1 year ago

Will be fixed once there is a plastex release that includes https://github.com/plastex/plastex/issues/308. (I wouldn't be opposed to a temporary problemtools workaround though, using try-catch instead of checking __version__.)