8000 TypeError: Can't index by type: <class 'NoneType'>; only int, string or slice · Issue #1 · chagmgang/pysc2_rl · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

TypeError: Can't index by type: <class 'NoneType'>; only int, string or slice #1

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

Open
lionel-xie opened this issue Mar 30, 2019 · 0 comments

Comments

@lionel-xie
Copy link

when i run CollectMineral(ppo)-->stata_group:
state = np.dstack((marine_map, mineral_map)).reshape(32322)
came out:
E0330 17:18:23.828569 81116 _logging.py:54] close status: 16896
W0330 17:18:26.929746 81116 sc_process.py:200] Killing the process.
Traceback (most recent call last):
File "E:/Anaconda/Lib/site-packages/pysc2/agents/pysc2_rl-master/CollectMineral(ppo)/CollectMineral.py", line 143, in
train()
File "E:/Anaconda/Lib/site-packages/pysc2/agents/pysc2_rl-master/CollectMineral(ppo)/CollectMineral.py", line 71, in train
state = obs2state(obs)
File "E:\Anaconda\Lib\site-packages\pysc2\agents\pysc2_rl-master\CollectMineral(ppo)\state_group.py", line 33, in obs2state
state = np.dstack((marine_map, mineral_map)).reshape(32322)
File "C:\Users\ASUS\AppData\Roaming\Python\Python36\site-packages\numpy\lib\shape_base.py", line 699, in dstack
return _nx.concatenate([atleast_3d(_m) for _m in tup], 2)
File "C:\Users\ASUS\AppData\Roaming\Python\Python36\site-packages\numpy\lib\shape_base.py", line 699, in
return _nx.concatenate([atleast_3d(_m) for _m in tup], 2)
File "C:\Users\ASUS\AppData\Roaming\Python\Python36\site-packages\numpy\core\shape_base.py", line 199, in atleast_3d
result = ary[:,:, newaxis]
File "E:\Anaconda\lib\site-packages\pysc2\lib\named_array.py", line 145, in getitem
index = _get_index(obj, index)
File "E:\Anaconda\lib\site-packages\pysc2\lib\named_array.py", line 207, in _get_index
"Can't index by type: %s; only int, string or slice" % type(index))
TypeError: Can't index by type: <class 'NoneType'>; only int, string or slice

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

1 participant
0