tries to print debugging info for agentskills

This commit is contained in:
Xingyao Wang
2024-07-28 17:34:56 -04:00
parent 863dcfb26e
commit 8be4c86756

View File

@@ -85,6 +85,12 @@ def update_pwd_decorator(func):
os.chdir(jupyter_pwd)
try:
return func(*args, **kwargs)
except Exception as e:
print(f'Failed to execute function {func.__name__}: {e}')
# Print debugging info
print(f'Current user: {os.getlogin()}')
print(f'Current IPython working directory: {os.getcwd()}')
raise e
finally:
os.chdir(old_pwd)