LiquidFun / Airway

Automatic classification of tertiary bronchi based on bronchus masks using a rule-based approach.
GNU General Public License v3.0
38 stars 19 forks source link

Error when running tutorial #14

Open Emibono11 opened 2 years ago

Emibono11 commented 2 years ago

Traceback (most recent call last): File "C:\Users\emibo\anaconda3\lib\runpy.py", line 197, in _run_module_as_main return _run_code(code, main_globals, None, File "C:\Users\emibo\anaconda3\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "C:\Users\emibo\anaconda3\Scripts\airway.exe__main__.py", line 7, in File "C:\Users\emibo\anaconda3\lib\site-packages\airway\cli\cli.py", line 35, in main handle_args() File "C:\Users\emibo\anaconda3\lib\site-packages\airway\cli\cli.py", line 29, in handle_args args.handle_args(args) File "C:\Users\emibo\anaconda3\lib\site-packages\airway\cli\base.py", line 37, in _handle_args_wrapper self.log(f"Running {self.col.bold()}{self.col.green('Airway')}", stdout=True, add_time=True) File "C:\Users\emibo\anaconda3\lib\site-packages\airway\cli\base.py", line 167, in log with open(self.log_path, "a+") as log_file: OSError: [Errno 22] Invalid argument: 'C:\Users\emibo\anaconda3\lib\site-packages\logs\log_2022-11-08_15:50:08'

LiquidFun commented 2 years ago

I can't reproduce it on Linux, but I assume you don't have permissions on Windows at that location. I've fixed it on the newest version of 0.2.3, it will not write a log file if it does not have permissions. Can you test it? I have no Windows system to try it on.

Emibono11 commented 2 years ago

Thanks for your time, this issue has been solved; however, now it gives the following error:

Traceback (most recent call last): File "C:\Users\emibo\anaconda3\lib\runpy.py", line 197, in _run_module_as_main return _run_code(code, main_globals, None, File "C:\Users\emibo\anaconda3\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "C:\Users\emibo\anaconda3\Scripts\airway.exe__main.py", line 7, in File "C:\Users\emibo\anaconda3\lib\site-packages\airway\cli\cli.py", line 35, in main handle_args() File "C:\Users\emibo\anaconda3\lib\site-packages\airway\cli\cli.py", line 12, in handle_args StagesCLI(), File "C:\Users\emibo\anaconda3\lib\site-packages\airway\cli\base.py", line 24, in init self.col = Color() File "C:\Users\emibo\anaconda3\lib\site-packages\airway\util\color.py", line 10, in init__ self.reset() File "C:\Users\emibo\anaconda3\lib\site-packages\airway\util\color.py", line 58, in reset return self._set_formatting(0) File "C:\Users\emibo\anaconda3\lib\site-packages\airway\util\color.py", line 62, in _set_formatting return self._set_color(self._prev_color) AttributeError: 'Color' object has no attribute '_prev_color'

I changed '_prev_color' to '_set_color' in line 62 of \util\color.py and now it seems to work flawlessly.