Skip to content

Commit

Permalink
Print before the bug
Browse files Browse the repository at this point in the history
  • Loading branch information
rafmudaf authored Nov 14, 2024
1 parent 598425d commit 3806d3b
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions floris/type_dec.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,14 +155,11 @@ def convert_to_path(fn: str | Path) -> Path:
# path from which `fn` might be based. [1] is where a direct call to this function will be
# located (e.g., testing via pytest), and [-1] is where a direct call to the function via an
# analysis script will be located (e.g., running an example).
base_fn_script = Path(inspect.stack()[-1].filename).resolve().parent
base_fn_sys = Path(inspect.stack()[1].filename).resolve().parent

print("base_fn_script ", base_fn_script)
print("base_fn_sys ", base_fn_sys)
print("inspect.stack()[0] ", inspect.stack()[0])
print("inspect.stack()[1] ", inspect.stack()[1])
print("inspect.stack()[-1] ", inspect.stack()[-1])
base_fn_script = Path(inspect.stack()[-1].filename).resolve().parent
base_fn_sys = Path(inspect.stack()[1].filename).resolve().parent

if isinstance(fn, Path):
absolute_fn = fn.resolve()
Expand Down

0 comments on commit 3806d3b

Please sign in to comment.