sip 6.8.0+: AttributeError: 'WrappedClass' object has no attribute 'original_typedef'
Phil Thompson
phil at riverbankcomputing.com
Tue Dec 5 09:36:59 GMT 2023
On 05/12/2023 00:37, Scott Talbert wrote:
> Hi Phil,
>
> Trying to build wxPython with sip 6.8.0+ (latest snapshot), I'm
> running into this Traceback:
>
> Generating the _propgrid bindings...
> sip-build: An internal error occurred...
> Traceback (most recent call last):
> File "/opt/hostedtoolcache/Python/3.12.0/x64/bin/sip-build", line 8,
> in <module>
> sys.exit(main())
> ^^^^^^
> File
> "/opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/sipbuild/tools/build.py",
> line 37, in main
> handle_exception(e)
> File
> "/opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/sipbuild/exceptions.py",
> line 83, in handle_exception
> raise e
> File
> "/opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/sipbuild/tools/build.py",
> line 34, in main
> project.build()
> File
> "/opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/sipbuild/project.py",
> line 245, in build
> self.builder.build()
> File
> "/opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/sipbuild/builder.py",
> line 46, in build
> self._generate_bindings()
> File
> "/opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/sipbuild/builder.py",
> line 273, in _generate_bindings
> buildable = bindings.generate()
> ^^^^^^^^^^^^^^^^^^^
> File
> "/opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/sipbuild/bindings.py",
> line 220, in generate
> output_code(spec, self, project, buildable)
> File
> "/opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/sipbuild/generator/outputs/code.py",
> line 60, in output_code
> _module_code(spec, bindings, project, py_debug, buildable)
> File
> "/opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/sipbuild/generator/outputs/code.py",
> line 512, in _module_code
> _virtual_handler(sf, spec, handler)
> File
> "/opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/sipbuild/generator/outputs/code.py",
> line 4530, in _virtual_handler
> sipres_value = _call_default_ctor(spec, ctor)
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File
> "/opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/sipbuild/generator/outputs/code.py",
> line 4254, in _call_default_ctor
> class_type = fmt_argument_as_cpp_type(spec, arg.definition)
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File
> "/opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/sipbuild/generator/outputs/formatters/argument.py",
> line 46, in fmt_argument_as_cpp_type
> original_typedef = arg.original_typedef
> ^^^^^^^^^^^^^^^^^^^^
> AttributeError: 'WrappedClass' object has no attribute
> 'original_typedef'
> Command 'sip-build --no-compile' failed with exit code 1.
>
>
> Let me know if you need more details.
>
> Thanks,
> Scott
The fix is probably to change 'arg.definition' to 'arg' in line 4254 of
code.py.
Given the nature of the changes in v6.8 there are likely to be other
minor regressions. I'll release v6.8.1 when you are happy with it.
Phil
More information about the PyQt
mailing list