from lib import action File "/opt/stackstorm/packs/aws/actions/lib/action.py", line 107 except Exception, e: ^ SyntaxError: invalid syntax
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 6.5k
- Forks
- 787
- PR merge metrics
- No merged PRs in 30d
Description
SUMMARY
st2 run command throwing syntax errors .
Provide a quick summary of your bug report.
STACKSTORM VERSION
Paste the output of st2 --version:
st2 --version
st2 3.4.1, on Python 3.6.13
OS, environment, install method
vagrant box
StackStorm v3.4.1 (Ubuntu 16.04 LTS GNU/Linux x86_64)
st2vagrant
Steps to reproduce the problem
Show how to reproduce the problem, using a minimal test-case. Make sure to include any content
(pack content - workflows, actions, etc.) which are needed to reproduce the problem.
st2 pack install aws
updated aws.yml file with keys from IAM role
excuted st2 run aws.ec2_get_all_tags
Expected Results
get list of ec2 tags
Actual Results
st2 run aws.ec2_get_all_tags
.
id: 60b4be16a161a571fbd73de6
action.ref: aws.ec2_get_all_tags
context.user: st2admin
parameters: None
status: failed
start_timestamp: Mon, 31 May 2021 10:44:38 UTC
end_timestamp: Mon, 31 May 2021 10:44:39 UTC
result:
exit_code: 1
result: None
stderr: "Traceback (most recent call last):
File "/opt/stackstorm/st2/lib/python3.6/site-packages/python_runner/python_action_wrapper.py", line 238, in _get_action_instance
actions_cls = action_loader.register_plugin(Action, self._file_path)
File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2common/util/loader.py", line 166, in register_plugin
module = imp.load_source(module_name, plugin_abs_file_path)
File "/opt/stackstorm/virtualenvs/aws/lib/python3.6/imp.py", line 172, in load_source
module = _load(spec)
File "", line 684, in _load
File "", line 665, in _load_unlocked
File "", line 678, in exec_module
File "", line 219, in _call_with_frames_removed
File "/opt/stackstorm/packs/aws/actions/run.py", line 1, in
from lib import action
File "/opt/stackstorm/packs/aws/actions/lib/action.py", line 107
except Exception, e:
^
SyntaxError: invalid syntax
Thanks!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with /opt/stackstorm/packs/aws/actions/lib/action.py at line 107, then reproduce the failure with st2 run aws.ec2_get_all_tags in the reported Python 3.6 environment. Confirm the action loads without a SyntaxError and returns the expected EC2 tag list.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, python
- Domain
- devops
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 25/100