【报错】“OSError: [Errno 22] Invalid argument: ‘cache\\resume_lattice_only_tra”

【报错】“OSError: [Errno 22] Invalid argument: 'cache\resume_lattice_only_train:”

Windows上运行Flat-Lattice-Transformer 上,报如下错误:
【报错】“OSError: [Errno 22] Invalid argument: ‘cache\\resume_lattice_only_tra”
报错原文:

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: [Errno 22] Invalid argument: ‘cache\\resume_lattice_only_tra”
求教:这个报错的原因到底是什么?冒号:和井号#的区别是啥

上一篇:pytorch 1.8.1 安装方法及坑点(no matching distribution found for xxx、OSError: [WinError 193] %1 不是有效的 Win32)


下一篇:mask R-CNN报错:OSError: Unable to open file