tennom / saxonpy

This's a Python package for the Saxon/C 1.2.1, an XML processor from Saxonica. Currently, it packs the open-source version or the home edition.
16 stars 1 forks source link

No module named 'nodekind' when trying to package using Pyinstaller #7

Open dostiep opened 1 year ago

dostiep commented 1 year ago

I'm getting the following error when I'm using Pyinstaller to create an executable file:

Traceback (most recent call last): File "xxxxxxx.pyw", line 7, in File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module File "saxonpy__init__.py", line 45, in File "python_saxon\saxonc.pyx", line 16, in init saxonc ModuleNotFoundError: No module named 'nodekind'

Not sure if it's a Pyinstaller or Saxonpy issue but I haven't been able to find a solution so far.

ond1 commented 1 year ago

I am not experienced in using Pyinstaller but it seems to be missing the file nodekind.py which is included in saxonpy

dostiep commented 1 year ago

I'm no Pyinstaller expert either but from what I read, it might be a "hook file" that is missing. Don't know if that might help solve the issue (https://pyinstaller.org/en/stable/hooks.html)

ond1 commented 1 year ago

Hi, just looking back at this issue. I had the same problem on SaxonC 12 and managed to remove the dependency (See the bug issue: https://saxonica.plan.io/issues/5853). This will be applied in the next maintenance release of SaxonC 12 which will be available on python saxonche, saxoncpe and saxoncee.