Hi Anbalagan,
I tested my v32 version of resilient-circuits (32.0.186) and had no issues with component directory functions. I would review your class definitions, mine look like this:
class FunctionComponent(ResilientComponent):
------------------------------
Mark Scherfling
------------------------------
Original Message:
Sent: Wed August 21, 2019 09:42 AM
From: Anbalagan Rajagopal
Subject: Getting "ImportError: No module named test_function"
I am getting "ImportError: No module named test_function" error while starting "resilient-circuits run".
Below is the procedure I have followed
- Using below command I have created a module inside components directory (without package option). And it is created successfully.
- resilient-circuits codegen -f test_function
- file test_function.py has been created in the components directory
- When I start "resilient-circuits run", it says
- Loading 'test_function' from /home/ActionModules/components/test_function.py
- ERROR [component_loader] Failed to load component 'test_function'
- ERROR [component_loader] No module named test_function
- Traceback (most recent call last):
- File "/usr/lib/python2.7/site-packages/resilient_circuits/component_loader.py", line 40, in safe_but_noisy_import
- return __import__(name, globals(), locals(), [""])
- ImportError: No module named test_function
I have been following this procedure for long time to implement many function without any problem. But suddently I started getting this error for newly created function.
Resilient Version is 32
Have anyone faced similar issue?
------------------------------
Anbalagan Rajagopal
------------------------------