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

Installation Tests fail (win) #13

Closed
zhiyue opened this issue Feb 15, 2022 · 3 comments
Closed

Installation Tests fail (win) #13

zhiyue opened this issue Feb 15, 2022 · 3 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@zhiyue
Copy link

zhiyue commented Feb 15, 2022

environment:

  • windows 10.0.19044 Build 19044

Installation Tests fail

diambraArena.bat "ROMSPATH=C:\Users\JOYY\diambraArena\roms\" "PYTHONFILE=diambraArenaGist.py"

DIAMBRAROMSPATH ENV VAR =

Executing in the docker (CPU image):
  Roms path: C:\Users\JOYY\diambraArena\roms\
  GUI Active: 0
  Command: python diambraArenaGist.py
  Current Directory: "C:\Users\JOYY\diambraArena\examples"
  Volume:
--

Namespace(romsPath=None)
EnvId = TestEnv
Action Spaces = multiDiscrete
Use attack buttons combinations = [True, True]
diambraEnv library successfully loaded
Stored credentials found.

-----------------------------------------------------------------------------------------------------------------------------------------------------------------
      .:-:-**#*#####+***+=-:.
 ..-++####+#################=+=:.
:+*#*###########################*-.
   .-+#############################=.
      .-*###########################+.
        .=######++======++*#########*#=. ........ ...     .......     ...........     ........     ........ ............     ............         ...........
          -*=------:---------=*########- .------..-----:. .------.   .-----------.    --------.   :-------- --------------:. --------------:.    :----------:
          .:--------:---------:=#######* .------..-------..------.   :-----:-----:.   ---------. .--------- ------:..:-----: ------:..------:   .------:-----.
        .:------::---::--------:+#######..------. .------..------.  .------.:-----.   ----------.---------- ------:..------. ------:  :-----.  .:-----:.------.
        :-----::.:---:-----::---:######* .------. .------..------. .:-----: .------.  ------:-------------- ------::-----:.. ------:.-----:.   .------..------.
       .--:..  . :::.:.---.-:---.#####*- .------. .------..------. .------.::------:  ------:.-----.:------ ------:  :-----: ------:.:------: .------:.:-------.
        ..:..:::.:::.::....:.::--:####*. .------::------:..------..------:.:::------. ------: .---. :-----: -------::------: ------:  ------: :------..::------:
       .-::::::---...:--. .-.:-::=###+.  .::::::::::::..  .::::::..::::::.   .::::::. ::::::.  .:.  ::::::: ::::::::::::::.  :::::::  ::::::: ::::::.    .::::::
       .--:.   .:--...::. ..::+####*:
       :--:..   .---:...:.   .:+*+:.
       .:---:::----.. ....    .:.
        .:------:..:...  :.
         .......   ..:.  ..


                                                                   DIAMBRA™ | Dueling AI Arena
                                                              https://diambra.ai - info@diambra.ai

                                   Usage of this software is subject to our Terms of Use described at https://diambra.ai/terms

                                                         DIAMBRA™ is a Trade Mark, © Copyright 2018-2022
                                                                              v. 1.0
-----------------------------------------------------------------------------------------------------------------------------------------------------------------


Environment initialization ...
Error: Cannot open "C:\Users\JOYY\diambraArena\roms\kof98umh.zip": No such file or directory.
You need to put the Game rom file in the roms directory.

Error: Cannot open "C:\Users\JOYY\diambraArena\roms\kof98umh.zip": No such file or directory.
You need to put the Game rom file in the roms directory.

------------------------------------------------------------------------------------------------------

        Contact support on DIAMBRA Discord Server: https://discord.gg/tFDS2UN5sv
                                        AND / OR
 Open a ticket on our GitHub repository issue Tracker: https://github.com/diambra/diambraArena/issues

ROM check works

diambraArena.bat "ROMSPATH=C:\Users\JOYY\diambraArena\roms\" "ROMCHECK=kof98umh.zip"

DIAMBRAROMSPATH ENV VAR =

Executing in the docker (CPU image):
  Roms path: C:\Users\JOYY\diambraArena\roms\
  GUI Active: 0
  Command: python -c 'import diambraArena, os; diambraArena.checkGameSha256(os.path.join(os.getenv(\"DIAMBRAROMSPATH\"), \"kof98umh.zip\"))'
  Current Directory: "C:\Users\JOYY\diambraArena\examples"
  Volume:
--

Correct ROM file for The King Of Fighters '98 UMH, sha256 = beb7bdea87137832f5f6d731fd1abd0350c0cd6b6b2d57cab2bedbac24fe8d0a

diambraArenaGist.py

import diambraArena
import argparse

parser = argparse.ArgumentParser()
parser.add_argument('--romsPath', type=str, required=False, help='Absolute path to roms')
opt = parser.parse_args()
print(opt)

# Mandatory settings
settings = {}
# Game selection
settings["gameId"] = "kof98umh"
settings["romsPath"] = "C:\\Users\\JOYY\\diambraArena\\roms\\"
# if opt.romsPath is not None:
#     # Path to roms folder
#     settings["romsPath"] = opt.romsPath

env = diambraArena.make("TestEnv", settings)

observation = env.reset()

while True:

    actions = env.action_space.sample()

    observation, reward, done, info = env.step(actions)

    if done:
        observation = env.reset()
        break

env.close()

@diambra
Copy link
Collaborator

diambra commented Feb 15, 2022

We're on it. We'll keep you posted.

@diambra
Copy link
Collaborator

diambra commented Feb 15, 2022

This problem is caused by the addition of settings["romsPath"] to the script.
In Docker executions, that parameter should never be added. We will improve robustness adding a check.

Removing that setting, all works fine as expected.

@diambra diambra added bug Something isn't working enhancement New feature or request labels Feb 15, 2022
@zhiyue zhiyue closed this as completed Feb 15, 2022
@diambra
Copy link
Collaborator

diambra commented Feb 18, 2022

Commit 472913f adds the robustness check to avoid this to happen again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant