8000 Update rnnrbm.py by LeoMingo · Pull Request #201 · lisa-lab/DeepLearningTutorials · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@LeoMingo
Copy link
Contributor

Hi, so I ran into this error at line 244, then I traced back the error it was due to at line 291, os.path.dirname(file) returned empty string and caused the split-out parent directory to be empty, thus the path argument passed into train() function became ./data/Nottingham/train/.mid which did not exist rather than ../data/Nottingham/train/ which was expected.
So I changed os.path.dirname(file) into os.path.dirname(os.path.abspath(file)) to get the current working directory from file's absolute path, by which you could then split out the parent directory.
You can refer the reason to this link: https://stackoverflow.com/questions/7783308/os-path-dirname-file-returns-empty

Hi, so I ran into this error at line 244, then I traced back the error it was due to at line 291, os.path.dirname(__file__) returned empty string and caused the split-out parent directory to be empty, thus the path argument passed into train() function became ./data/Nottingham/train/*.mid which did not exist rather than ../data/Nottingham/train/* which was expected.
So I changed os.path.dirname(__file__) into os.path.dirname(os.path.abspath(__file__)) to get the current working directory from file's absolute path, by which you could then split out the parent directory.
You can refer the reason to this link: https://stackoverflow.com/questions/7783308/os-path-dirname-file-returns-empty
@lamblin lamblin merged commit 238a0bc into lisa-lab:master Jan 26, 2018
@lamblin
Copy link
Member
lamblin commented Jan 26, 2018

Thanks!

@LeoMingo LeoMingo deleted the patch-3 branch January 26, 2018 05:00
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

Successfully merging this pull request may close these issues.

2 participants

0