From a84957fd458b326825f720d052f3c6c7ced49e53 Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Mon, 27 Jul 2026 19:22:15 +1000 Subject: [PATCH] Fix Wrong number or type of arguments for overloaded function 'new_file I got this error, so I used the same pattern I saw in the generated wrapper py: | File "/home/dion/.config/blender/5.2/extensions/.local/lib/python3.13/site-packages/ifcopenshell/api/project/create_file.py", line 54, in create_file | file = ifcopenshell.file(schema=version) | File "/home/dion/.config/blender/5.2/extensions/.local/lib/python3.13/site-packages/ifcopenshell/ifcopenshell_wrapper.py", line 5242, in __init__ | _ifcopenshell_wrapper.new_file(self, identifier) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^ | TypeError: Wrong number or type of arguments for overloaded function 'new_file'. | Possible C/C++ prototypes are: | ifcopenshell::file::file(std::string const &,ifcopenshell::filetype,bool,::logger &) | ifcopenshell::file::file(std::string const &,ifcopenshell::filetype,bool) | ifcopenshell::file::file(std::string const &,ifcopenshell::filetype) | ifcopenshell::file::file(std::istream &,int,::logger &) | ifcopenshell::file::file(std::istream &,int) | ifcopenshell::file::file(void *,int,::logger &) | ifcopenshell::file::file(void *,int) | ifcopenshell::file::file(ifcopenshell::schema_definition const *,ifcopenshell::filetype,std::string const &,::logger &) | ifcopenshell::file::file(ifcopenshell::schema_definition const *,ifcopenshell::filetype,std::string const &) | ifcopenshell::file::file(ifcopenshell::schema_definition const *,ifcopenshell::filetype) | ifcopenshell::file::file(ifcopenshell::schema_definition const *) | ifcopenshell::file::file() | ifcopenshell::file::file(ifcopenshell::uninitialized_tag const &,::logger &) | ifcopenshell::file::file(ifcopenshell::uninitialized_tag const &) | ifcopenshell::file::file(std::string const &) --- src/ifcwrap/IfcParseWrapper.i | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ifcwrap/IfcParseWrapper.i b/src/ifcwrap/IfcParseWrapper.i index 6688d2440b..4a86c9a932 100644 --- a/src/ifcwrap/IfcParseWrapper.i +++ b/src/ifcwrap/IfcParseWrapper.i @@ -45,7 +45,7 @@ identifier = schema_identifier else: identifier = self._determine_schema_identifier(schema=schema, schema_version=schema_version) - $action(self, identifier) + _ifcopenshell_wrapper.file_swiginit(self, $action(identifier)) %} %ignore ifcopenshell::instance_streamer>::read_instance;