Question: How to create VDS with an OpenVDS::VDSError in constructor? (Python API)
Dear Devs,
I was trying to use openvds.create
with an error output parameter, however, seems Pybind11 exports are not happy with accepting <class 'openvds.core.VDSError'>
for argument typed as error: OpenVDS::VDSError
.
The snippet I'm playing with is something like that:
import openvds
self.forward_error = openvds.VDSError
self.vds_handle: openvds.core.VDS = openvds.create(
vds_url,
connection_string,
layout_descriptor,
axis_descriptors,
channel_descriptors,
metadata_container,
self.forward_error,
)
code without passing self.forward_error
works correctly. If I try to fill error output parameter I'm getting:
TypeError: create(): incompatible function arguments. The following argument types are supported:
E 1. (url: str, connectionString: str, layoutDescriptor: OpenVDS::VolumeDataLayoutDescriptor, axisDescriptors: List[OpenVDS::VolumeDataAxisDescriptor], channelDescriptors: List[OpenVDS::VolumeDataChannelDescriptor], metadata: OpenVDS::MetadataReadAccess, compressionMethod: OpenVDS::CompressionMethod, compressionTolerance: float, error: OpenVDS::VDSError) -> openvds.core.VDS
E 2. (url: str, connectionString: str, layoutDescriptor: OpenVDS::VolumeDataLayoutDescriptor, axisDescriptors: List[OpenVDS::VolumeDataAxisDescriptor], channelDescriptors: List[OpenVDS::VolumeDataChannelDescriptor], metadata: OpenVDS::MetadataReadAccess, compressionMethod: OpenVDS::CompressionMethod, compressionTolerance: float) -> openvds.core.VDS
E 3. (url: str, connectionString: str, layoutDescriptor: OpenVDS::VolumeDataLayoutDescriptor, axisDescriptors: List[OpenVDS::VolumeDataAxisDescriptor], channelDescriptors: List[OpenVDS::VolumeDataChannelDescriptor], metadata: OpenVDS::MetadataReadAccess, error: OpenVDS::VDSError) -> openvds.core.VDS
E 4. (url: str, connectionString: str, layoutDescriptor: OpenVDS::VolumeDataLayoutDescriptor, axisDescriptors: List[OpenVDS::VolumeDataAxisDescriptor], channelDescriptors: List[OpenVDS::VolumeDataChannelDescriptor], metadata: OpenVDS::MetadataReadAccess) -> openvds.core.VDS
...
E Invoked with: '/tmp/pytest-of-filip/pytest-32/<REDACTED>/subset_0.vds', '', <openvds.core.VolumeDataLayoutDescriptor object at 0x7f80f269c0b0>, [<openvds.core.VolumeDataAxisDescriptor object at 0x7f80f269c830>, <openvds.core.VolumeDataAxisDescriptor object at 0x7f80f269c970>, <openvds.core.VolumeDataAxisDescriptor object at 0x7f80f269cc70>], [<openvds.core.VolumeDataChannelDescriptor object at 0x7f80f269c870>], <openvds.core.MetadataContainer object at 0x7f80f2683fb0>, <class 'openvds.core.VDSError'>
From the log message, the constructor that works is number 4, and the one I'm trying to use is 3. Am I doing something dumb, and seeing it?
Context: We're trying to debug a rare issue, where writing data pages fails without apparent exception in Python, causing a zombie Python process in a container, that just hangs; My thought was, we might be able to use an error parameter constructor to have some logs, as the issue occurred a handful of times till then, and we don't have a root cause yet, but neither do we have any logs. If you have any tips, on how to grab any log that might have been created (we're writing to the S3 bucket, behind OSDU SDMS API) I would appreciate it.
Thanks, Filip