#65 __init__.py write failure when --module-prefix and --binding-root options used together

PyXB 1.1.1
closed
fixed
Generation Model
major
PyXB 1.1.0
defect
2009-12-10
2009-12-09
No

When both --module-prefix and --binding-root options are used together, the following exception appears:

Exception generating bindings: [Errno 2] No such file or directory: 'TestPrefix/init.py'
Traceback (most recent call last):

File "/alma/ACS-8.1/Python/bin/pyxbgen", line 70, in <module>

modules = generator.bindingModules()

File "/alma/ACS-8.1/Python/lib/python2.5/site-packages/pyxb/binding/generate.py", line 2388, in bindingModules

self.bindingModules = self.buildBindingModules()

File "/alma/ACS-8.1/Python/lib/python2.5/site-packages/pyxb/binding/generate.py", line 2302, in buildBindingModules

nsm = NamespaceModule(self, mr, mr_scc)

File "/alma/ACS-8.1/Python/lib/python2.5/site-packages/pyxb/binding/generate.py", line 1292, in init

self._setModulePath(generator.modulePathData(self))

File "/alma/ACS-8.1/Python/lib/python2.5/site-packages/pyxb/binding/generate.py", line 1542, in modulePathData

file(init_path, 'w')

IOError: [Errno 2] No such file or directory: 'TestPrefix/init.py'

It appears that the path information given by the binding-root option is not applied to the file name generated for the package init.py file. The generated binding file is written to the correct location however.

I've attached a script that demonstrates the fault.

1 Attachments

Discussion

  • Arne Grimstrup

    Arne Grimstrup - 2009-12-09

    Tarball containing script that demonstrates the reported fault

     
  • Peter A. Bigot

    Peter A. Bigot - 2009-12-10
    • status changed from new to closed
    • resolution set to fixed

    Fixed in [2102]. There were other problems, especially when --write-for-customization was mixed in. I added a test based on your bug report; thanks.

    This will be in 1.1.1. If you have a pressing need for the fix, let me know and I'll expedite the release.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks