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

按文档里的quick start后,各种报错 #6

Open
wuyibaobao opened this issue Aug 11, 2024 · 0 comments
Open

按文档里的quick start后,各种报错 #6

wuyibaobao opened this issue Aug 11, 2024 · 0 comments

Comments

@wuyibaobao
Copy link

首先就是,无论我是py3.9还是py3.8的环境,均会报错Traceback (most recent call last):
File "test.py", line 4, in
from task import Task
File "C:\Users\80564\Desktop\VeryFL-main\task.py", line 13, in
from dataset.DatasetSpliter import DatasetSpliter
File "C:\Users\80564\Desktop\VeryFL-main\dataset\DatasetSpliter.py", line 11, in
class DatasetSpliter:
File "C:\Users\80564\Desktop\VeryFL-main\dataset\DatasetSpliter.py", line 49, in DatasetSpliter
def dirichlet_split(self, dataset: Dataset, client_list: dict, batch_size: int = 32, alpha: int = 1) -> dict[DataLoader]:
TypeError: 'type' object is not subscriptable
GPT说py3.9这个-> dict[DataLoader]注释语法是正确的,不应该会报错,莫名其妙。
鉴于其为注释语法,删除后继续尝试运行,又会报错Traceback (most recent call last):
File "test.py", line 8, in
set_log_config()
File "C:\Users\80564\Desktop\VeryFL-main\config\log.py", line 24, in set_log_config
logging.basicConfig(filename = get_file_name(),
File "D:\anaconda3\envs\FLL\lib\logging_init_.py", line 1988, in basicConfig
h = FileHandler(filename, mode)
File "D:\anaconda3\envs\FLL\lib\logging_init_.py", line 1147, in init
StreamHandler.init(self, self.open())
File "D:\anaconda3\envs\FLL\lib\logging_init
.py", line 1176, in open
return open(self.baseFilename, self.mode, encoding=self.encoding)
FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\80564\Desktop\VeryFL-main\log\2024_08_11_0.log',看起来是找不到log日志文件夹,遂手动目录中新建一个文件夹,之后运行,仍然报错如下。。。。
Traceback (most recent call last):
File "test.py", line 8, in
set_log_config()
File "C:\Users\80564\Desktop\VeryFL-main\config\log.py", line 24, in set_log_config
logging.basicConfig(filename = get_file_name(),
File "D:\anaconda3\envs\FLL\lib\logging_init
.py", line 2009, in basicConfig
raise ValueError('Unrecognised argument(s): %s' % keys)
ValueError: Unrecognised argument(s): encoding
真是让人莫名其妙又头大,gpt4也无法解决

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

1 participant