lnis-uofu / OpenFPGA

An Open-source FPGA IP Generator
https://openfpga.readthedocs.io/en/master/
MIT License
816 stars 160 forks source link

curr_task_dir is not defined #330

Closed lukefahr closed 3 years ago

lukefahr commented 3 years ago

https://github.com/lnis-uofu/OpenFPGA/blob/36113d35ac38e9ce10cec45dfbd18cac9e0c12de/openfpga_flow/scripts/run_fpga_task.py#L177

Traceback (most recent call last): File "openfpga_flow/scripts/run_fpga_task.py", line 514, in main() File "openfpga_flow/scripts/run_fpga_task.py", line 99, in main job_run_list = generate_each_task_actions(eachtask) File "openfpga_flow/scripts/run_fpga_task.py", line 177, in generate_each_task_actions clean_up_and_exit("Task directory [%s] not found" % curr_task_dir) UnboundLocalError: local variable 'curr_task_dir' referenced before assignment

tangxifan commented 3 years ago

@lukefahr The error is actually means that the script cannot find the task.conf file with a given path to a task directory.

lukefahr commented 3 years ago

Hi Xifan,

I think what you want is for the python to politely say "Task directory X is not found" then die. What's actually happening is python is crashing on an unbound local variable error because curr_task_dir is not defined.

-A

tangxifan commented 3 years ago

@lukefahr You are right. That is I want to improve as well. We will create a PR to solve this issue.