dailenson / SDT

This repository is the official implementation of Disentangling Writer and Character Styles for Handwriting Generation (CVPR23).
MIT License
956 stars 81 forks source link

文件明明就在指定路径,就是找不到 #51

Closed maygyd closed 6 months ago

maygyd commented 7 months ago

image image 指令及报错: C:\Windows\system32>python E:\ai\SDT-master\SDT-master\user_generate.py --pretrained_model checkpoint_path --style_path sampal Traceback (most recent call last): File "E:\ai\SDT-master\SDT-master\user_generate.py", line 78, in main(opt) File "E:\ai\SDT-master\SDT-master\user_generate.py", line 14, in main cfg_from_file(opt.cfg_file) File "E:\ai\SDT-master\SDT-master\parse_config.py", line 214, in merge_cfg_from_file with open(cfg_filename, 'r') as f: FileNotFoundError: [Errno 2] No such file or directory: 'configs/CHINESE_USER.yml'

chengtx809 commented 7 months ago

我也遇到这个问题,是通过--cfg指定绝对路径搞好的,如我的是在给的启动参数后面加上: --cfg D:\HuaweiMoveData\Users\mianl\Desktop\SDT-master\configs\CHINESE_USER.yml

maygyd commented 7 months ago

我也遇到这个问题,是通过--cfg指定绝对路径搞好的,如我的是在给的启动参数后面加上: --cfg D:\HuaweiMoveData\Users\mianl\Desktop\SDT-master\configs\CHINESE_USER.yml

是直接改文件的代码吗

maygyd commented 7 months ago

我也遇到这个问题,是通过--cfg指定绝对路径搞好的,如我的是在给的启动参数后面加上: --cfg D:\HuaweiMoveData\Users\mianl\Desktop\SDT-master\configs\CHINESE_USER.yml

image 还是不行

chengtx809 commented 7 months ago

那我也不清楚了:( 蹲下原作者大佬

13232308597 commented 7 months ago

image image 指令及报错: C:\Windows\system32>python E:\ai\SDT-master\SDT-master\user_generate.py --pretrained_model checkpoint_path --style_path sampal Traceback (most recent call last): File "E:\ai\SDT-master\SDT-master\user_generate.py", line 78, in main(opt) File "E:\ai\SDT-master\SDT-master\user_generate.py", line 14, in main cfg_from_file(opt.cfg_file) File "E:\ai\SDT-master\SDT-master\parse_config.py", line 214, in merge_cfg_from_file with open(cfg_filename, 'r') as f: FileNotFoundError: [Errno 2] No such file or directory: 'configs/CHINESE_USER.yml'

有两种解决方法,第一种是直接在指令行命令输入“cd E:\ai\SDT-master\SDT-master” 第二种是直接在对应文件夹路径框里输入“cmd”,回车。 完事后当前工作目录就会改变,由原来的C:\Windows\system32>变成E:\ai\SDT-master\SDT-master> 你学废了吗:)

13232308597 commented 7 months ago

这类问题是因为文件不在当前工作目录导致的。当前工作目录在C盘,而文件在E盘,执行程序时在C盘检索不到文件,显示notfound

maygyd commented 7 months ago

image image 指令及报错: C:\Windows\system32>python E:\ai\SDT-master\SDT-master\user_generate.py --pretrained_model checkpoint_path --style_path sampal Traceback (most recent call last): File "E:\ai\SDT-master\SDT-master\user_generate.py", line 78, in main(opt) File "E:\ai\SDT-master\SDT-master\user_generate.py", line 14, in main cfg_from_file(opt.cfg_file) File "E:\ai\SDT-master\SDT-master\parse_config.py", line 214, in merge_cfg_from_file with open(cfg_filename, 'r') as f: FileNotFoundError: [Errno 2] No such file or directory: 'configs/CHINESE_USER.yml'

有两种解决方法,第一种是直接在指令行命令输入“cd E:\ai\SDT-master\SDT-master” 第二种是直接在对应文件夹路径框里输入“cmd”,回车。 完事后当前工作目录就会改变,由原来的C:\Windows\system32>变成E:\ai\SDT-master\SDT-master> 你学废了吗:)

这一步解决了,谢谢

dailenson commented 7 months ago

一个最粗暴的方法就是把有问题的路径都改成绝对路径