ifcOpenShell; How to work with file content instead of file path
I am trying to develop a Dash app for ifc files but I am stuck at the first step.
The dash upload component gives acces to the content of the uploaded file but not the uploaded path so I am not really sure how to work with that.
The ifc.open() method doesnt work without a path.
I looked around in the ifcopenshell folder and found that the ifcopenshell_wrapper has an read() method so I tried the following code:
import ifcopenshell as ifc
from ifcopenshell import ifcopenshell_wrapper
from ifcopenshell.ifcopenshell_wrapper import file
f = ifcopenshell_wrapper.read(contents)
ifc_file = file(f)
But I get this error:
Wrong number or type of arguments for overloaded function 'new_file'.
Possible C/C++ prototypes are:
IfcParse::IfcFile::IfcFile(std::string const &)
IfcParse::IfcFile::IfcFile(IfcParse::schema_definition const *)
What did I do wrong? Or is there another way around?