Closed LolloSpring closed 4 years ago
I was able to reproduce this error with an old version of stix2-patterns. I suspect your version is old, and the stix2 library was missing a version restriction on its dependency. So stix2-patterns wouldn't have been updated when you updated stix2. I made a PR to hopefully fix this. In the meantime, you could try manually updating stix2-patterns to the latest version and see if the problem goes away.
Yes! By updating manually stix2-pattern to the latest version (in my case version 1.3.1.), the problem goes away! Thank you for your dedication and for your intuition on how to solve the problem: that it is the right path!
This lines of code in my program
produce the following stacktrace error:
Digging into the file
/Users/placeholder/PycharmProjects/files_project/venv/lib/python3.6/site-packages/stix2/v21/sdo.py
, this is line 225 reported in the error stacktrace:errors = run_validator(self.get('pattern'), pat_ver)
By deleting the second argument
pat_ver
and saving the sdo.py file with this new line 225errors = run_validator(self.get('pattern'))
the error seems solved without any side-effect.Is my patch proposal valid and plausible also for other users? Thanks for your time and dedication!