1

I'm trying make sense of XML messages in Python with the use of PyXB.

However, when I install PyXB, I'm getting an error when trying to use the pyxbgen command: "'pxbgen' is not recognized as an internal or external command, operable program or batch file."

I'm using Anaconda to manage packages and I'm running Windows 10.

For context, I've been trying to follow this GitHub readme, but I'm stuck on generating classes:

https://github.com/openraildata/stomp-client-python

I've tried installing from pip as well as through conda-forge but the result is the same (and I also can't locate the pyxbgen file). I've also tried using setup.py manually, after which I found the pyxbgen file but still cannot use it.

I have seen the issue appearing on the internet but no real solution. Any advice on how to solve/diagnose the issue?

Sharkz
  • 345
  • 1
  • 2
  • 13

1 Answers1

3

First, you need pyxbgen, not pxbgen. If it's not found ask pip where it's installed:

pip show --files pyxb

Second, a year ago the author announced End-of-Life. You can try a little bit updated fork:

pip install git+https://github.com/jonfoster/pyxb.git#egg=pyxb

Once I sent a few fixes and they were accepted.

You may also try to look at generateDS. It's still being actively developed.

PS. I've tried both products but my XML Schema is so big and complex both failed to handle it. Do not be disappointed and not expect too much from them.

phd
  • 82,685
  • 13
  • 120
  • 165
  • 1
    Thanks! Apparently it's not been working on Windows for a while now.. https://github.com/pabigot/pyxb/issues/103 – Sharkz Jun 02 '19 at 19:52