This is my directory structure
docker
├── etc
│ └── runit
│ └── artifacts
│ └── refresh-access
└── sbin
└── cardlib
├── auth
│ └── request_signer.py
└── sentinel_client.py
I am trying to invoke sentinel_client.py in the refresh-access bash script as below
call_report_health() {
python3 /sbin/cardlib/sentinel_client.py report_health "$1" "$2"
}
But I am seeing the following error
2023-07-18_13:27:29.20969 File "/sbin/cardlib/sentinel_client.py", line 3, in <module>
2023-07-18_13:27:29.20970 from .auth import request_signer
2023-07-18_13:27:29.20970 ImportError: attempted relative import with no known parent package
How to resolve this issue?
I tried to use absolute path which did not work . I tried to invoke sentinel_client.py as a module which resulted in the below error
2023-07-19_00:21:00.15938 /venv38/bin/python3: Error while finding module specification for 'sbin.cardlib.sentinel_client' (ModuleNotFoundError: No module named 'sbin')