Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error during run all test #78

Open
rajeget opened this issue Jul 12, 2024 · 3 comments
Open

Error during run all test #78

rajeget opened this issue Jul 12, 2024 · 3 comments

Comments

@rajeget
Copy link

rajeget commented Jul 12, 2024

Describe the bug
Error while executing following

atomic-operator run --techniques=all or atomic-operator run

Error as follows :

Traceback (most recent call last):
  File "/usr/local/bin/atomic-operator", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/ubuntu/.local/lib/python3.12/site-packages/atomic_operator/__main__.py", line 6, in main
    fire.Fire({
  File "/home/ubuntu/.local/lib/python3.12/site-packages/fire/core.py", line 141, in Fire
    component_trace = _Fire(component, args, parsed_flag_args, context, name)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ubuntu/.local/lib/python3.12/site-packages/fire/core.py", line 475, in _Fire
    component, remaining_args = _CallAndUpdateTrace(
                                ^^^^^^^^^^^^^^^^^^^^
  File "/home/ubuntu/.local/lib/python3.12/site-packages/fire/core.py", line 691, in _CallAndUpdateTrace
    component = fn(*varargs, **kwargs)
                ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ubuntu/.local/lib/python3.12/site-packages/atomic_operator/atomic_operator.py", line 355, in run
    self.__run_technique(item)
  File "/home/ubuntu/.local/lib/python3.12/site-packages/atomic_operator/atomic_operator.py", line 106, in __run_technique
    self._set_input_arguments(test, **kwargs)
  File "/home/ubuntu/.local/lib/python3.12/site-packages/atomic_operator/base.py", line 167, in _set_input_arguments
    if k in input.default:
       ^^^^^^^^^^^^^^^^^^
TypeError: argument of type 'NoneType' is not iterable

However , single test works fine .

atomic-operator run --techniques T1564.001 --input_arguments '{"project-id": "some_value", "another_key": "another value"}'

Desktop (please complete the following information):

  • OS: [e.g. iOS] : Ubuntu 24.0 LTS
@Plensu
Copy link

Plensu commented Jul 12, 2024

@rajeget The pypi version seems to have a few issues. I would recommend trying to uninstalling and installing from source.

pip install git+https://github.com/swimlane/atomic-operator.git#egg=atomic-operator

@Benjamin-Connelly
Copy link

Same, not working on 20/22/24.04 LTS Ubuntu for me. I have tried running virtual envs with multiple version of Python.

@Plensu
Copy link

Plensu commented Jul 16, 2024

@Benjamin-Connelly I think the issue is fixed in the source version. You will run into a similar issue where it'll throw an error because of other types not being iterable. I threw together a fix for it and submited a PR for it.

Feel free to check out my fix and modify the code locally: Plensu@113a40d

Or you can install directly from my repo by doing the following:
pip install git+https://github.com/plensu/atomic-operator.git#egg=atomic-operator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants