Commit e82dadc
authored
Update rnnrbm.py
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-empty1 parent 8bd8a5a commit e82dadc
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
288 | 288 | | |
289 | 289 | | |
290 | 290 | | |
291 | | - | |
| 291 | + | |
| 292 | + | |
292 | 293 | | |
293 | 294 | | |
294 | 295 | | |
| |||
0 commit comments