CHANYUEPO
Results
issues of
CHANYUEPO
我在获取某个用户答案时,发现如果该问题描述中含有反斜杠 /,写文件时就会报错! f = open(os.path.join(os.path.join(os.getcwd(), "text"), file_name), "wt") IOError: [Errno 2] No such file or directory: '/home/liutong/zhihu-python/text/\xe6\x9c\x8d\xe7\x94\xa8\xe6\x8a\x97\xe6\x8a\x91\xe9\x83\x81\xe8\x8d\xaf/\xe6\x8a\x97\xe7\x84\xa6\xe8\x99\x91\xe8\x8d\xaf\xe6\x98\xaf\xe4\xbb\x80\xe4\xb9\x88\xe4\xbd\x93\xe9\xaa\x8c\xef\xbc\x9f\xe5\x96\xb5\xe5\x96\xb5\xe4\xb9\x88\xe4\xb9\x88\xe4\xb9\x88\xe7\x9a\x84\xe5\x9b\x9e\xe7\xad\x94.txt' 我的系统是ubuntu 14.04