How to solve "ValueError: Shapes must be equal rank" when I use a customized env and use baseline to do DQN?

I use a Gym environment produced by others, which can be found on gym-gomoku When I use baselines to try to train a model, an ERROR occurs like:

ValueError: Shapes must be equal rank, but are 1 and 2 for 'deepq/Select' 
(op: 'Select') with input shapes: [?], [?], [?,361].

I think there is something wrong with the environment but I can't get it.Because it is successful when I test other game environment on Gym's website like 'CartPole-v0'.

Thank a lot!

here is my code:

import gym
from baselines import deepq
def callback(lcl, _glb):
    # stop training if reward exceeds 199
    is_solved = lcl['t'] > 0.9 and sum(lcl['episode_rewards'][-101:-1]) / 100 >= 0.9
    return is_solved


def main():
    env = gym.make("Gomoku19x19-v0")
    model = deepq.models.mlp([32, 16], layer_norm=True)
    act = deepq.learn(
    env,
    q_func=model,
    lr=0.01,
    max_timesteps=10000,
    print_freq=1,
    checkpoint_freq=1000
)
    print("Saving model to Gomoku9x9.pkl")
    act.save("Gomoku9x9.pkl")
    print('Finish!')


if __name__ == '__main__':
    main()