OASIS TC Open Repository: A GitHub public repository for development of a python library to transform between data-interchange formats (such as JSON) and python language objects
I'm using openc2==1.0.5, stix2==3.0.1, stix2-patterns==2.0.0.
When I run the code, I get the following error.
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/stix2/base.py", line 50, in _check_property
kwargs[prop_name], has_custom = prop.clean(
TypeError: ComponentProperty.clean() takes 2 positional arguments but 3 were given
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/data/foo.py", line 5, in <module>
cmd = openc2.v10.Command(
File "/usr/local/lib/python3.10/dist-packages/openc2/base.py", line 59, in __init__
super(_OpenC2Base, self).__init__(allow_custom, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/stix2/base.py", line 203, in __init__
temp_custom = self._check_property(
File "/usr/local/lib/python3.10/dist-packages/stix2/base.py", line 58, in _check_property
raise InvalidValueError(
stix2.exceptions.InvalidValueError: Invalid value for Command 'target': ComponentProperty.clean() takes 2 positional arguments but 3 were given
I'm trying to reproduce the following code snipped, retrieved by the
README.md
file.I'm using
openc2==1.0.5
,stix2==3.0.1
,stix2-patterns==2.0.0
.When I run the code, I get the following error.
How can I solve the issue?