Skip to content

stackstorm_openstack.server.create fails with failed import #381

Open

Description

@DavidFair

Trying to run the stackstorm_openstack.server.create action results in the following error message:

Traceback (most recent call last):
  File "/opt/stackstorm/st2/lib/python3.8/site-packages/python_runner/python_action_wrapper.py", line 395, in <module>
    obj.run()
  File "/opt/stackstorm/st2/lib/python3.8/site-packages/python_runner/python_action_wrapper.py", line 214, in run
    output = action.run(**self._parameters)
  File "/opt/stackstorm/packs/stackstorm_openstack/actions/src/openstack_actions.py", line 20, in run
    action_module = import_module(module)
  File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'openstack_api'

We should check:

  • Has this file changed recently?
  • Is openstack in the requirements.txt file?

Activity

  1. jose-caballero commented on Sep 24, 2025

    @jose-caballero
    Contributor

    @anish-mudaraddi what is the PYTHONPATH in st2?
    I am just wondering if lines like

    from apis.openstack_api.openstack_connection import OpenstackConnection

    should be replaced by

    from lib.apis.openstack_api.openstack_connection import OpenstackConnection

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions