fix unicode bug
This commit is contained in:
		
							parent
							
								
									256e61b64d
								
							
						
					
					
						commit
						043a9ea068
					
				@ -47,7 +47,8 @@ def write_results_to_file(history, file_name=None):
 | 
			
		||||
    """
 | 
			
		||||
    import os, time
 | 
			
		||||
    if file_name is None:
 | 
			
		||||
        file_name = time.strftime("chatGPT分析报告%Y-%m-%d-%H-%M-%S", time.localtime()) + '.md'
 | 
			
		||||
        # file_name = time.strftime("chatGPT分析报告%Y-%m-%d-%H-%M-%S", time.localtime()) + '.md'
 | 
			
		||||
        file_name = 'chatGPT分析报告' + time.strftime("%Y-%m-%d-%H-%M-%S", time.localtime()) + '.md'
 | 
			
		||||
    os.makedirs('./gpt_log/', exist_ok=True)
 | 
			
		||||
    with open(f'./gpt_log/{file_name}', 'w', encoding = 'utf8') as f:
 | 
			
		||||
        f.write('# chatGPT 分析报告\n')
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user