Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in ut init #62

Open
wangmengyu1 opened this issue Dec 24, 2023 · 2 comments
Open

Error in ut init #62

wangmengyu1 opened this issue Dec 24, 2023 · 2 comments

Comments

@wangmengyu1
Copy link

Hi~I encountered the following error during model initialization

Traceback (most recent call last):
File "", line 198, in run_module_as_main
File "", line 88, in run_code
File "E:\anaconda\envs\u-sleep\Scripts\ut.exe_main
.py", line 7, in
File "E:\anaconda\envs\u-sleep\Lib\site-packages\utime\bin\ut.py", line 103, in entry_func
mod.entry_func(script_args + help_agrs)
File "E:\anaconda\envs\u-sleep\Lib\site-packages\utime\bin\init.py", line 133, in entry_func
run(parser.parse_args(args))
File "E:\anaconda\envs\u-sleep\Lib\site-packages\utime\bin\init.py", line 127, in run
init_project_folder(default_folder, args.model, out_folder, data_dir)
File "E:\anaconda\envs\u-sleep\Lib\site-packages\utime\bin\init.py", line 102, in init_project_folder
copy_yaml_and_set_data_dirs(in_file_path, out_file_path, data_dir)
File "E:\anaconda\envs\u-sleep\Lib\site-packages\utime\bin\init.py", line 62, in copy_yaml_and_set_data_dirs
hparams = YAMLHParams(in_path, no_version_control=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\anaconda\envs\u-sleep\Lib\site-packages\utime\hyperparameters_init
.py", line 125, in init
super(YAMLHParams, self).init(yaml_path,
File "E:\anaconda\envs\u-sleep\Lib\site-packages\yamlhparams\yaml_hparams.py", line 52, in init
temp_map = YAML(typ='rt').load(in_f)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\anaconda\envs\u-sleep\Lib\site-packages\ruamel\yaml\main.py", line 432, in load
constructor, parser = self.get_constructor_parser(stream)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\anaconda\envs\u-sleep\Lib\site-packages\ruamel\yaml\main.py", line 483, in get_constructor_parser
self.reader.stream = stream
^^^^^^^^^^^^^^^^^^
File "E:\anaconda\envs\u-sleep\Lib\site-packages\ruamel\yaml\reader.py", line 133, in stream
self.determine_encoding()
File "E:\anaconda\envs\u-sleep\Lib\site-packages\ruamel\yaml\reader.py", line 193, in determine_encoding
self.update_raw()
File "E:\anaconda\envs\u-sleep\Lib\site-packages\ruamel\yaml\reader.py", line 288, in update_raw
data = self.stream.read(size)
^^^^^^^^^^^^^^^^^^^^^^
File "", line 322, in decode
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 650: invalid start byte

@kun2001github
Copy link

System: windows10
Installation mode: pip install utime
Version: 1.1.7
I had the same problem
“UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 650: invalid start byte”
I solved this problem by using utime1.1.8, which was built with source code
——————————————————————
We have another problem FileNotFoundError: [Errno 2] No such file or directory: 'C:\dataset_configurations\dcsm.yaml'
————————————————
The detailed error is as follows:
(u-sleep) C:\Users\xxa\Desktop\U-Time-main\U-Time-main>ut init --name demo --model usleep_demo

2024/04/07 13:31:06 | INFO | Entry script args dump: {'script': 'init', 'project_dir': './', 'log_dir': 'logs', 'log_level': 'INFO', 'seed': None}

2024/04/07 13:31:06 | INFO | Project directory set: C:\Users\xxa\Desktop\U-Time-main\U-Time-main (initialized project: False)

2024/04/07 13:31:07 | INFO | Logs will not be saved to file for these loggers: [<Logger utime (INFO)>, <Logger psg_utils (INFO)>] (--log_file_name is empty)

2024/04/07 13:31:07 | INFO | Initializing project in project folder: C:\Users\xxa\Desktop\U-Time-main\U-Time-main\demo (model preset: 'usleep_demo')
Traceback (most recent call last):
File "H:\SoftWares\Working\Anaconda\envs\u-sleep\Scripts\ut-script.py", line 33, in
sys.exit(load_entry_point('utime==1.1.8', 'console_scripts', 'ut')())
File "H:\SoftWares\Working\Anaconda\envs\u-sleep\lib\site-packages\utime-1.1.8-py3.7.egg\utime\bin\ut.py", line 103, in entry_func
mod.entry_func(script_args + help_agrs)
File "H:\SoftWares\Working\Anaconda\envs\u-sleep\lib\site-packages\utime-1.1.8-py3.7.egg\utime\bin\init.py", line 133, in entry_func
run(parser.parse_args(args))
File "H:\SoftWares\Working\Anaconda\envs\u-sleep\lib\site-packages\utime-1.1.8-py3.7.egg\utime\bin\init.py", line 127, in run
init_project_folder(default_folder, args.model, out_folder, data_dir)
File "H:\SoftWares\Working\Anaconda\envs\u-sleep\lib\site-packages\utime-1.1.8-py3.7.egg\utime\bin\init.py", line 102, in init_project_folder
copy_yaml_and_set_data_dirs(in_file_path, out_file_path, data_dir)
File "H:\SoftWares\Working\Anaconda\envs\u-sleep\lib\site-packages\utime-1.1.8-py3.7.egg\utime\bin\init.py", line 71, in copy_yaml_and_set_data_dirs
hparams.save_current(out_path)
File "H:\SoftWares\Working\Anaconda\envs\u-sleep\lib\site-packages\yamlhparams\yaml_hparams.py", line 152, in save_current
with open(out_path, "w") as out_f:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\dataset_configurations\dcsm.yaml'

@kun2001github
Copy link

System: windows10 系统:windows 10 Installation mode: pip install utime 安装方式:pip install utime Version: 1.1.7  版本:1.1.7 I had the same problem 我有同样的问题 “UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 650: invalid start byte” “UnicodeDecodeError:'utf-8'编解码器无法解码位置650中的字节0x 80:无效的起始字节” I solved this problem by using utime1.1.8, which was built with source code 我使用utime1.1.8解决了这个问题,它是用源代码构建的 —————————————————————— We have another problem FileNotFoundError: [Errno 2] No such file or directory: 'C:\dataset_configurations\dcsm.yaml' 我们有另一个问题FileNotFoundError:[Errno 2] No such file or directory:'C:\dataset_configurations\dcsm.yaml' ———————————————— The detailed error is as follows: 详细错误如下: (u-sleep) C:\Users\xxa\Desktop\U-Time-main\U-Time-main>ut init --name demo --model usleep_demo (u-sleep)C:\Users\xxa\Desktop\U-Time-main\U-Time-main>ut init --name demo --model usblog_demo

2024/04/07 13:31:06 | INFO | Entry script args dump: {'script': 'init', 'project_dir': './', 'log_dir': 'logs', 'log_level': 'INFO', 'seed': None}2024/04/07 13:31:06|信息|Entry script args dump:输入'script':'init','project_dir':'./ ','log_dir':'logs','log_level':'INFO',' seed':无}

2024/04/07 13:31:06 | INFO | Project directory set: C:\Users\xxa\Desktop\U-Time-main\U-Time-main (initialized project: False)2024/04/07 13:31:06|信息|项目目录集:C:\Users\xxa\Desktop\U-Time-main\U-Time-main(初始化项目:False)

2024/04/07 13:31:07 | INFO | Logs will not be saved to file for these loggers: [<Logger utime (INFO)>, <Logger psg_utils (INFO)>] (--log_file_name is empty)2024/04/07 13:31:07|信息|日志不会保存到这些记录器的文件:[<Logger utime(INFO)>,<Logger psg_utils(INFO)>](--log_file_name为空)

2024/04/07 13:31:07 | INFO | Initializing project in project folder: C:\Users\xxa\Desktop\U-Time-main\U-Time-main\demo (model preset: 'usleep_demo')2024/04/07 13:31:07|信息|正在项目文件夹中初始化项目:C:\Users\xxa\Desktop\U-Time-main\U-Time-main\demo(模型预设:'uscycle_demo') Traceback (most recent call last): 回溯(最近的呼叫最后一次): File "H:\SoftWares\Working\Anaconda\envs\u-sleep\Scripts\ut-script.py", line 33, in 文件“H:\SoftWares\Working\Anaconda\envs\u-sleep\sleep\ut-script.py”,第33行, sys.exit(load_entry_point('utime==1.1.8', 'console_scripts', 'ut')()) sys.exit(load_entry_point('utime == 1.1.8','console_scripts','ut')()) File "H:\SoftWares\Working\Anaconda\envs\u-sleep\lib\site-packages\utime-1.1.8-py3.7.egg\utime\bin\ut.py", line 103, in entry_func 文件“H:\SoftWares\Working\Anaconda\envs\u-sleep\lib\site-packages\utime-1.1.8-py3.7.egg\utime\bin\ut.py”,第103行,在entry_func中 mod.entry_func(script_args + help_agrs) mod.entry_func(script_args + help_agrs) File "H:\SoftWares\Working\Anaconda\envs\u-sleep\lib\site-packages\utime-1.1.8-py3.7.egg\utime\bin\init.py", line 133, in entry_func 文件“H:\SoftWares\Working\Anaconda\envs\u-sleep\lib\site-packages\utime-1.1.8-py3.7.egg\utime\bin\init.py”,第133行,在entry_func中 run(parser.parse_args(args)) run(parser.parse_args(args)) File "H:\SoftWares\Working\Anaconda\envs\u-sleep\lib\site-packages\utime-1.1.8-py3.7.egg\utime\bin\init.py", line 127, in run 文件“H:\SoftWares\Working\Anaconda\envs\u-sleep\lib\site-packages\utime-1.1.8-py3.7.egg\utime\bin\init.py”,第127行,运行中 init_project_folder(default_folder, args.model, out_folder, data_dir) init_project_folder(default_folder,args.model,out_folder,data_dir) File "H:\SoftWares\Working\Anaconda\envs\u-sleep\lib\site-packages\utime-1.1.8-py3.7.egg\utime\bin\init.py", line 102, in init_project_folder 文件“H:\SoftWares\Working\Anaconda\envs\u-sleep\lib\site-packages\utime-1.1.8-py3.7.egg\utime\bin\init.py”,第102行,在init_project_folder中 copy_yaml_and_set_data_dirs(in_file_path, out_file_path, data_dir) copy_yaml_and_set_data_dirs(in_file_path,out_file_path,data_dir) File "H:\SoftWares\Working\Anaconda\envs\u-sleep\lib\site-packages\utime-1.1.8-py3.7.egg\utime\bin\init.py", line 71, in copy_yaml_and_set_data_dirs 文件“H:\SoftWares\Working\Anaconda\envs\u-sleep\lib\site-packages\utime-1.1.8-py3.7.egg\utime\bin\init.py”,第71行,在copy_yaml_and_set_data_dirs中 hparams.save_current(out_path) hparams.save_current(out_path) File "H:\SoftWares\Working\Anaconda\envs\u-sleep\lib\site-packages\yamlhparams\yaml_hparams.py", line 152, in save_current 文件“H:\SoftWares\Working\Anaconda\envs\u-sleep\lib\site-packages\yamlhparams\yaml_hparams.py”,第152行,在保存_current中 with open(out_path, "w") as out_f: 使用open(out_path,“w”)作为out_f: FileNotFoundError: [Errno 2] No such file or directory: 'C:\dataset_configurations\dcsm.yaml' FileNotFoundError:[Errno 2] No such file or directory:'C:\dataset_configurations\dcsm.yaml'

FileNotFoundError: [Errno 2] No such file or directory: 'C:\dataset_configurations\dcsm.yaml'
I solved the problem, and here is the solution #57
@sindrijonsson Thank you for your solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants