Traceback (most recent call last): File "D:\PythonProject\test.py", line 10, in <module> yaml_info_dict = yaml.safe_load(f) File "D:\PythonProject\lib\site-packages\ruamel\yaml\main.py", line 1111, in safe_load return load(stream, SafeLoader, version) File "D:\PythonProject\lib\site-packages\ruamel\yaml\main.py", line 1063, in load return loader._constructor.get_single_data() File "D:\PythonProject\lib\site-packages\ruamel\yaml\constructor.py", line 111, in get_single_data node = self.composer.get_single_node() File "D:\PythonProject\lib\site-packages\ruamel\yaml\composer.py", line 70, in get_single_node document = self.compose_document() File "D:\PythonProject\lib\site-packages\ruamel\yaml\composer.py", line 92, in compose_document node = self.compose_node(None, None) File "D:\PythonProject\lib\site-packages\ruamel\yaml\composer.py", line 128, in compose_node node = self.compose_mapping_node(anchor) File "D:\PythonProject\lib\site-packages\ruamel\yaml\composer.py", line 209, in compose_mapping_node item_value = self.compose_node(node, item_key) File "D:\PythonProject\lib\site-packages\ruamel\yaml\composer.py", line 126, in compose_node node = self.compose_sequence_node(anchor) File "D:\PythonProject\lib\site-packages\ruamel\yaml\composer.py", line 170, in compose_sequence_node while not self.parser.check_event(SequenceEndEvent): File "D:\PythonProject\lib\site-packages\ruamel\yaml\parser.py", line 139, in check_event self.current_event = self.state() File "D:\PythonProject\lib\site-packages\ruamel\yaml\parser.py", line 527, in parse_block_sequence_entry if not self.scanner.check_token(BlockEntryToken, BlockEndToken): File "D:\PythonProject\lib\site-packages\ruamel\yaml\scanner.py", line 168, in check_token self.fetch_more_tokens() File "D:\PythonProject\lib\site-packages\ruamel\yaml\scanner.py", line 311, in fetch_more_tokens raise ScannerError( ruamel.yaml.scanner.ScannerError: while scanning for the next token found character '\t' that cannot start any token in "E:\yuanshuju\重点元数据提取配置.yaml", line 30, column 1
时间: 2023-08-10 20:09:22 浏览: 204
这个错误是由于在你的YAML文件中发现了一个不能作为令牌开始的制表符('\t')字符,导致解析器无法继续解析。在YAML中,制表符通常不是有效的空白字符,因此不能用于标记语法结构。
要解决这个问题,你可以打开你的YAML文件,找到包含制表符的行,并将制表符替换为适当的空格。
此外,确保你的YAML文件的语法是正确的,包括正确的缩进和结构。这个错误可能也与YAML文件的语法问题有关。
请注意,在修复问题后重新运行代码之前,请确保你已经保存了你的YAML文件。
如果问题仍然存在,请提供你的YAML文件中相关部分的内容,以便我可以更具体地分析和帮助解决问题。
相关问题
> config: configs/diffusion_vec768l12.yaml > exp: exp/diffusion-test | Load HifiGAN: pretrain/nsf_hifigan/model Removing weight norm... [*] restoring model from exp/diffusion-test\model_0.pt Load all the data from : data/train 0%| | 0/859 [00:00<?, ?it/s] Traceback (most recent call last): File "train_diff.py", line 66, in <module> loader_train, loader_valid = get_data_loaders(args, whole_audio=False) File "F:\liandan\DDSP-SVC-3.0\diffusion\data_loaders.py", line 52, in get_data_loaders data_train = AudioDataset( File "F:\liandan\DDSP-SVC-3.0\diffusion\data_loaders.py", line 143, in __init__ raise ValueError(' [x] Muiti-speaker traing error : spk_id must be a positive integer from 1 to n_spk ') ValueError: [x] Muiti-speaker traing error : spk_id must be a positive integer from 1 to n_spk
这个错误提示看起来是在进行多说话者训练时出现的。错误提示说 spk_id 必须是从 1 到 n_spk 的正整数,但是代码中 spk_id 不符合这个要求,因此出现了 ValueError 错误。
我建议你检查代码中的 spk_id 是否正确,并确保它是一个从 1 到 n_spk 的正整数。你还可以检查你的训练数据,确认说话者标识符是否正确,并且没有缺失或冗余的数据。如果你需要更多的帮助,请提供更多的上下文和代码,这样我才能更好地帮助你解决这个问题。
E:\LSAN-master\LSAN-master\utils.py:19: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details. return AttrDict(yaml.load(open(path, 'r'))) loading data... Traceback (most recent call last): File "E:\LSAN-master\LSAN-master\classification.py", line 11, in <module> train_loader, test_loader, label_embed,embed,X_tst,word_to_id,Y_tst,Y_trn = data_got.load_data(batch_size=config.batch_size) File "E:\LSAN-master\LSAN-master\data_got.py", line 6, in load_data X_tst = np.load(r"/data/blchen/text/preprocessed/AAPD/X_test.npy") File "D:\Anaconda3\envs\pytorchEnv\lib\site-packages\numpy\lib\npyio.py", line 372, in load fid = open(file, "rb") FileNotFoundError: [Errno 2] No such file or directory: '/data/blchen/text/preprocessed/AAPD/X_test.npy'
这是一个错误提示信息,看起来是在加载数据时出现了问题。具体来说,它似乎无法找到指定的文件 '/data/blchen/text/preprocessed/AAPD/X_test.npy'。这可能是由于文件名或路径错误、文件不存在或权限不足等原因引起的。您可以仔细检查文件名、文件路径和文件权限,以确保文件存在并且您有足够的权限读取它。
阅读全文