diff --git a/README.md b/README.md index 285c10d..cf01cc1 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,9 @@ # ChatGPT 学术优化 -**如果喜欢这个项目,请给它一个Star;如果你发明了更好用的学术快捷键,欢迎发issue或者pull requests** +**如果喜欢这个项目,请给它一个Star;如果你发明了更好用的学术快捷键,欢迎发issue或者pull requests(dev分支)** -If you like this project, please give it a Star. If you've come up with more useful academic shortcuts, feel free to open an issue or pull request. +If you like this project, please give it a Star. If you've come up with more useful academic shortcuts, feel free to open an issue or pull request (to `dev` branch). ``` 代码中参考了很多其他优秀项目中的设计,主要包括: diff --git a/toolbox.py b/toolbox.py index 3e9ec17..b78a513 100644 --- a/toolbox.py +++ b/toolbox.py @@ -84,7 +84,10 @@ def write_results_to_file(history, file_name=None): with open(f'./gpt_log/{file_name}', 'w', encoding = 'utf8') as f: f.write('# chatGPT 分析报告\n') for i, content in enumerate(history): - if type(content) != str: content = str(content) + try: # 这个bug没找到触发条件,暂时先这样顶一下 + if type(content) != str: content = str(content) + except: + continue if i%2==0: f.write('## ') f.write(content) f.write('\n\n')