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

FileNotFoundError: #16

Open
Throne-myworld opened this issue Nov 17, 2021 · 6 comments
Open

FileNotFoundError: #16

Throne-myworld opened this issue Nov 17, 2021 · 6 comments

Comments

@Throne-myworld
Copy link

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?

@markcutajar
Copy link

markcutajar commented Nov 17, 2021

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)

@Throne-myworld
Copy link
Author

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
Copy link
Author

Throne-myworld commented Nov 18, 2021

@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?

@markcutajar
Copy link

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.

@Throne-myworld
Copy link
Author

Better error handling is definitely needed here.

OK , I will try it as soon as possible.

@Throne-myworld
Copy link
Author

Throne-myworld commented Nov 18, 2021

@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

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

2 participants