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

AttributeError: 'Dataset' object has no attribute 'root' Dataset of deeprobust #138

Open
ppoopp2er2er opened this issue Apr 27, 2023 · 2 comments

Comments

@ppoopp2er2er
Copy link

from deeprobust.graph.data import Dataset

Traceback (most recent call last):
.....
File "D:\ProgramData\anaconda3\envs\ai\lib\site-packages\deeprobust\graph\data\dataset.py", line 99, in get_prognn_splits
json_file = osp.join(self.root,
AttributeError: 'Dataset' object has no attribute 'root'

first:
open the file :D:\ProgramData\anaconda3\envs\ai\Lib\site-packages\deeprobust\graph\data\dataset.py
second:
line 67: "root = root" should be revised as "slef.root = root"

@chengwuxinlin
Copy link

thanks, this did solve the issue. BTW, it should be
self.root = root

@FinAminToastCrunch
Copy link
Contributor

FinAminToastCrunch commented Jun 24, 2023

Hi, I am the reason you are getting this error as I submitted a pull request to do this. I accidentally wrote root = root rather than self.root = root. Normally, it would infer the root from os.path. This would work fine on linux but it would not work on windows. That is why you must specify self.root if you are using deeprobust with windows. Thank you @chengwuxinlin for answering the question.

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

3 participants