Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Question Help with a MLagent error

Discussion in 'ML-Agents' started by SpulberA, Dec 17, 2022.

  1. SpulberA


    Dec 17, 2022
    Hello, Im trying to do a NN with mlagent 0.17.0 following this guide

    and when I enter mlagents-learn ....

    it throws back this

    WARNING:tensorflow:From C:\Users\Alex\.conda\envs\mlagent05\lib\site-packages\tensorflow\python\compat\ disable_resource_variables (from tensorflow.python.ops.variable_scope) is deprecated and will be removed in a future version.
    Instructions for updating:
    non-resource variables are not supported in the long term
    Traceback (most recent call last):
    File "C:\Users\Alex\.conda\envs\mlagent05\lib\", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
    File "C:\Users\Alex\.conda\envs\mlagent05\lib\", line 87, in _run_code
    exec(code, run_globals)
    File "C:\Users\Alex\.conda\envs\mlagent05\Scripts\mlagents-learn.exe\", line 4, in <module>
    File "C:\Users\Alex\.conda\envs\mlagent05\lib\site-packages\mlagents\trainers\", line 13, in <module>
    from mlagents.trainers.trainer_controller import TrainerController
    File "C:\Users\Alex\.conda\envs\mlagent05\lib\site-packages\mlagents\trainers\", line 14, in <module>
    from mlagents.trainers.env_manager import EnvManager
    File "C:\Users\Alex\.conda\envs\mlagent05\lib\site-packages\mlagents\trainers\", line 12, in <module>
    from mlagents.trainers.policy.tf_policy import TFPolicy
    File "C:\Users\Alex\.conda\envs\mlagent05\lib\site-packages\mlagents\trainers\policy\", line 17, in <module>
    from mlagents.trainers.settings import TrainerSettings, NetworkSettings
    File "C:\Users\Alex\.conda\envs\mlagent05\lib\site-packages\mlagents\trainers\", line 180, in <module>
    class TrainerSettings(ExportableSettings):
    File "C:\Users\Alex\.conda\envs\mlagent05\lib\site-packages\mlagents\trainers\", line 202, in TrainerSettings
    File "C:\Users\Alex\.conda\envs\mlagent05\lib\site-packages\cattr\", line 207, in register_structure_hook
    self._structure_func.register_cls_list([(cl, func)])
    File "C:\Users\Alex\.conda\envs\mlagent05\lib\site-packages\cattr\", line 55, in register_cls_list
    self._single_dispatch.register(cls, handler)
    File "C:\Users\Alex\.conda\envs\mlagent05\lib\", line 855, in register
    raise TypeError(
    TypeError: Invalid first argument to `register()`. typing.Dict[mlagents.trainers.settings.RewardSignalType, mlagents.trainers.settings.RewardSignalSettings] is not a class.

    and it doesnt show the unity logo.

    What should i do? Also im new to this so i dont know much.
    Also im using anaconda
  2. GamerLordMat


    Oct 10, 2019
    the video seems somewhat outdated, try maybe the video from "code monkey"