ibmresilient / resilient-python-api

Python Library for the IBM SOAR REST API, a Python SDK for developing Apps for IBM SOAR and more...
https://ibm.biz/soar-python-docs
MIT License
39 stars 28 forks source link

resilient-sdk package failing because of markupsafe dependecy error #23

Closed poleshe closed 2 years ago

poleshe commented 2 years ago

Description

A dependency is failing when trying to execute resilient-sdk package. It can be solved locally installing an older version of the package, hard to fix on pipelines / automations.

Thanks for your time!

Describe How to Reproduce

Launching resilient-sdk package -p . --display-name --repository
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.7.12/x64/bin/resilient-sdk", line 33, in <module>
    sys.exit(load_entry_point('resilient-sdk==43.1.2656', 'console_scripts', 'resilient-sdk')())
  File "/opt/hostedtoolcache/Python/3.7.12/x64/bin/resilient-sdk", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/importlib_metadata/__init__.py", line 203, in load
    module = import_module(match.group('module'))
  File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/resilient_sdk/app.py", line 11, in <module>
    from resilient_sdk.cmds import (CmdClone, CmdCodegen, CmdDev, CmdDocgen,
  File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/resilient_sdk/cmds/__init__.py", line 5, in <module>
    from resilient_sdk.cmds.docgen import CmdDocgen
  File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/resilient_sdk/cmds/docgen.py", line 14, in <module>
    from resilient_sdk.util import package_file_helpers as package_helpers
  File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/resilient_sdk/util/package_file_helpers.py", line 21, in <module>
    from resilient_sdk.util import constants, sdk_helpers
  File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/resilient_sdk/util/sdk_helpers.py", line 26, in <module>
    from jinja2 import Environment, PackageLoader
  File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/jinja2/__init__.py", line 12, in <module>
    from .environment import Environment
  File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/jinja2/environment.py", line 25, in <module>
    from .defaults import BLOCK_END_STRING
  File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/jinja2/defaults.py", line 3, in <module>
    from .filters import FILTERS as DEFAULT_FILTERS  # noqa: F401
  File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/jinja2/filters.py", line 13, in <module>
    from markupsafe import soft_unicode
ImportError: cannot import name 'soft_unicode' from 'markupsafe' (/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/markupsafe/__init__.py)

It seems related with https://github.com/pallets/markupsafe/issues/282

sj-curtin commented 2 years ago

Not this is because you are using Python 3.7 - we officially support 3.6 and 2.7

We will be supporting 3.9 in our next release which should be out soon 🤞

poleshe commented 2 years ago

Thanks. @sj-curtin!