mlagents-learn Enters Error occurs in commandline prompt. Help solve this problem

(venv) C:\Users\spv20\MLAgents-Intro>mlagents-learn
Traceback (most recent call last):
File “”, line 198, in run_module_as_main
File “”, line 88, in run_code
File "C:\Users\spv20\MLAgents-Intro\venv\Scripts\mlagents-learn.exe_main
.py", line 4, in
File “C:\Users\spv20\MLAgents-Intro\venv\Lib\site-packages\mlagents\trainers\learn.py”, line 2, in
from mlagents import torch_utils
File "C:\Users\spv20\MLAgents-Intro\venv\Lib\site-packages\mlagents\torch_utils_init
.py", line 1, in
from mlagents.torch_utils.torch import torch as torch # noqa
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\spv20\MLAgents-Intro\venv\Lib\site-packages\mlagents\torch_utils\torch.py”, line 6, in
from mlagents.trainers.settings import TorchSettings
File “C:\Users\spv20\MLAgents-Intro\venv\Lib\site-packages\mlagents\trainers\settings.py”, line 644, in
class TrainerSettings(ExportableSettings):
File “C:\Users\spv20\MLAgents-Intro\venv\Lib\site-packages\mlagents\trainers\settings.py”, line 667, in TrainerSettings
cattr.register_structure_hook(
File “C:\Users\spv20\MLAgents-Intro\venv\Lib\site-packages\cattr\converters.py”, line 207, in register_structure_hook
self._structure_func.register_cls_list([(cl, func)])
File “C:\Users\spv20\MLAgents-Intro\venv\Lib\site-packages\cattr\dispatch.py”, line 55, in register_cls_list
self._single_dispatch.register(cls, handler)
File “C:\Users\spv20\AppData\Local\Programs\Python\Python311\Lib\functools.py”, line 864, in register
raise TypeError(
TypeError: Invalid first argument to register(). typing.Dict[mlagents.trainers.settings.RewardSignalType, mlagents.trainers.settings.RewardSignalSettings] is not a class or union type.

(venv) C:\Users\spv20\MLAgents-Intro>pip list
Package Version


absl-py 2.0.0
attrs 23.1.0
cachetools 5.3.1
cattrs 1.5.0
certifi 2023.7.22
charset-normalizer 3.3.1
cloudpickle 3.0.0
filelock 3.12.4
fsspec 2023.10.0
google-auth 2.23.3
google-auth-oauthlib 1.1.0
grpcio 1.59.0
h5py 3.10.0
idna 3.4
Jinja2 3.1.2
Markdown 3.5
MarkupSafe 2.1.3
mlagents 0.28.0
mlagents-envs 0.28.0
mpmath 1.3.0
networkx 3.2
numpy 1.26.1
oauthlib 3.2.2
Pillow 10.1.0
pip 23.3.1
protobuf 3.20.0
pyasn1 0.5.0
pyasn1-modules 0.3.0
pypiwin32 223
pywin32 306
PyYAML 6.0.1
requests 2.31.0
requests-oauthlib 1.3.1
rsa 4.9
setuptools 65.5.0
six 1.16.0
sympy 1.12
tensorboard 2.15.0
tensorboard-data-server 0.7.1
torch 2.1.0
torchaudio 2.1.0
torchvision 0.16.0
typing_extensions 4.8.0
urllib3 2.0.7
Werkzeug 3.0.0

I have the same problem; how do you fix it?

Has anyone been able to solve this issue,please