【报错】“OSError: [Errno 22] Invalid argument: ‘cache\\resume_lattice_only_tra”
作者:互联网
【报错】“OSError: [Errno 22] Invalid argument: 'cache\resume_lattice_only_train:”
Windows上运行Flat-Lattice-Transformer 上,报如下错误:
报错原文:
Traceback (most recent call last):
File “flat_main.py”, line 343, in
only_train_min_freq=args.only_train_min_freq)
File “E:\Anaconda\envs\torch\lib\site-packages\fastNLP\core\utils.py”, line 160, in wrapper
with open(cache_filepath, ‘wb’) as f:
OSError: [Errno 22] Invalid argument: ‘cache\resume_lattice_only_train:False_trainClip:True_norm_num:0char_min_freq1bigram_min_freq1word_min_freq1only_train_min_freqTruenumber__train_min_freqTruenumber_norm0lexicon_yjload_dataset_seed_100’
解决办法:
在flat_main.py 的 line 328中修改“:”为“ #”
求教:这个报错的原因到底是什么?冒号:和井号#的区别是啥
标签:OSError,22,min,cache,only,train,报错,py 来源: https://blog.51cto.com/u_15273918/2917738