Replace calls to \htmladdnormallink with \href and swap arguments. \htmladdnormallink is no longer supported in TexLive 2022 so replace with \href and swap the input arguments around.
Don't call Py_Initialize before Py_Main This is unsupported, and breaks sys.path on Python 3.10. Since https://github.com/python/cpython/commit/af1d64d9f7a7cf673279725fdbaf4adcca51d41f See: https://bugs.python.org/issue36204 See: https://bugs.python.org/issue34008