import traceback try: os.getcwd('exc') except Exception: exc = traceback.format_exc() print(exc) 相关文章: 2022-02-24 2021-11-30 2021-08-18 2021-10-04 2022-12-23 2022-12-23