Using FilePathAttribute.BehaviorChoice.Save in Python

Hi,

In Python, this works without problem to mark that a property must be an existing file path:

prop.AddAttribute(FilePathAttribute, FilePathAttribute.BehaviorChoice.Open, "sqlite")

However, when chaning it to Save to be able to select a non-existing path (to write data to):

prop.AddAttribute(FilePathAttribute, FilePathAttribute.BehaviorChoice.Save, "sqlite")

one get’s the following error:

00:00:05.766 : Python        : Information : Argument 1: cannot convert from 'int' to 'OpenTap.FilePathAttribute.BehaviorChoice'

How do I solve this?

Thanks,
Bram

Sounds like a bug, maybe just report it in GitLab?

1 Like