Traceback (most recent call last):
File "D:\Program Files\JetBrains\PyCharm Community Edition 2024.1.4\plugins\python-ce\helpers\pydev\pydevd.py", line 1551, in exec
pydev_imports.execfile(file, globals, locals) # execute the script
File "D:\Program Files\JetBrains\PyCharm Community Edition 2024.1.4\plugins\python-ce\helpers\pydev_pydev_imps_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "D:\UoT\run.py", line 111, in
run(args)
File "D:\UoT\run.py", line 14, in run
task = get_task(args)
File "D:\UoT\src\uot\tasks_init.py", line 7, in get_task
return MDTask(args)
File "D:\UoT\src\uot\tasks\medical_diagnosis.py", line 15, in init
self.data = self.load_dataset(args.dataset)
File "D:\UoT\src\uot\tasks\medical_diagnosis.py", line 32, in load_dataset
return json.loads(os.path.join(os.path.dirname(file), f"../data/{name}.json").read())
AttributeError: 'str' object has no attribute 'read'
Traceback (most recent call last):
File "D:\Program Files\JetBrains\PyCharm Community Edition 2024.1.4\plugins\python-ce\helpers\pydev\pydevd.py", line 1551, in exec
pydev_imports.execfile(file, globals, locals) # execute the script
File "D:\Program Files\JetBrains\PyCharm Community Edition 2024.1.4\plugins\python-ce\helpers\pydev_pydev_imps_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "D:\UoT\run.py", line 111, in
run(args)
File "D:\UoT\run.py", line 14, in run
task = get_task(args)
File "D:\UoT\src\uot\tasks_init.py", line 7, in get_task
return MDTask(args)
File "D:\UoT\src\uot\tasks\medical_diagnosis.py", line 15, in init
self.data = self.load_dataset(args.dataset)
File "D:\UoT\src\uot\tasks\medical_diagnosis.py", line 32, in load_dataset
return json.loads(os.path.join(os.path.dirname(file), f"../data/{name}.json").read())
AttributeError: 'str' object has no attribute 'read'