Arnold icon indicating copy to clipboard operation
Arnold copied to clipboard

FileNotFoundError:

Open Throne-myworld opened this issue 4 years ago • 7 comments

when I download the code and run arnold.py using pycharm in Windows, things go like that:

FileNotFoundError: [Errno 2] No such file or directory: 'D:\PyCharmproject\Arnold-master\Arnold-master\dumped\default\vhzihaaocq\train.log' Can this programm run successfully using Win10?

Throne-myworld avatar Nov 17 '21 09:11 Throne-myworld

I think the package was designed for linux which allows automatic creation of folders vhzihaaocq for example. However, Windows doesn't allow that to get it to work, changes need to be done to pre-create the folder than use the log.

Checking it out, in src/utils.py all the

subprocess.Popen("mkdir %s" % main_dump_path, shell=True).wait()

lines or similar needs to be changed to

os.makedirs(_path_name)

markcutajar avatar Nov 17 '21 16:11 markcutajar

I think the package was designed for linux which allows automatic creation of folders vhzihaaocq for example. However, Windows doesn't allow that to get it to work, changes need to be done to pre-create the folder than use the log.

Checking it out, in src/utils.py all the

subprocess.Popen("mkdir %s" % main_dump_path, shell=True).wait()

lines or similar needs to be changed to

os.makedirs(_path_name)

good work, my friend!

Throne-myworld avatar Nov 18 '21 11:11 Throne-myworld

@markcutajar ,but a new issue comes,: File "D:\PyCharmproject\Arnold-master\Arnold-master\src\doom\game.py", line 133, in init assert os.path.isfile(self.scenario_path) AssertionError when I try to print the self.scenario_path, it says:D:\PyCharmproject\Arnold-master\Arnold-master\resources\scenarios\ .wad, there is no filename before'.wad', it really confused me. Also, the inti_py in the model folder is empty, so how should I do to run the code? using arnold.py or init_py?

Throne-myworld avatar Nov 18 '21 12:11 Throne-myworld

I don't think that error is related, to run the script make sure you run it as explained in the readme:

python arnold.py --scenario defend_the_center --action_combinations "turn_lr+attack" --frame_skip 2

I think the issue is that if you just run python.arnold.py the scenario is not given and it is not captured earlier in the processes. Better error handling is definitely needed here.

markcutajar avatar Nov 18 '21 12:11 markcutajar

Better error handling is definitely needed here.

OK , I will try it as soon as possible.

Throne-myworld avatar Nov 18 '21 13:11 Throne-myworld

@markcutajar I tried it , the new issue says File "D:\PyCharmproject\Arnold-master\Arnold-master\src\model\dqn\base.py", line 81, in base_forward output = torch.cat([conv_output] + embeddings, dim=1) RuntimeError: torch.cat(): Tensors must have same number of dimensions: got 2 and 3

Throne-myworld avatar Nov 18 '21 13:11 Throne-myworld