Closed cwschilly closed 11 months ago
The actual lbsRank.py file is at
~/miniconda3/envs/py38/lib/python3.8/site-packages/lbaf/Model/lbsRank.py
While the error shows that it's looking in
~/miniconda3/envs/py38/lib/python3.8/src/lbaf/Model/lbsRank.py
(Difference between site-packages
and src
)
The error comes from the __print_QOI()
function in LBAF_app.py, where I mistakenly hard-coded src
into the path:
def __print_QOI(self) -> int: # pylint:disable=C0103:invalid-name # not snake case
"""Print list of implemented QOI based on the '-verbosity' command line argument."""
verbosity = int(self.__args.verbose)
# Initialize file paths
target_dir = os.path.join(PROJECT_PATH, "src", "lbaf", "Model")
rank_script_name = "lbsRank.py"
object_script_name = "lbsObject.py"
# Create list of all Rank QOI (Rank.get_*)
r_qoi_list = ["work"]
lbs_rank_file = open(os.path.join(target_dir, rank_script_name), 'r', encoding="utf-8")
lbs_rank_lines = lbs_rank_file.readlines()
for line in lbs_rank_lines:
if line[8:12] == "get_":
r_qoi_list.append(line[12:line.find("(")])
We need to find another way to specify the target directory
Follow on to #447
When I run
I get the following error: