louis030195 / xmoto-gym

OpenAi's gym environment for Xmoto game - reinforcement learning research
2 stars 0 forks source link

Score recognition bug #13

Open louis030195 opened 5 years ago

louis030195 commented 5 years ago

https://github.com/louis030195/xmoto-gym/blob/2f2ca31662564cf6c4fdea96ca96156e047ed7b3/image_preprocessor.py#L97

Traceback (most recent call last): File "example.py", line 6, in env.step(env.action_space.sample()) # take a random action File "/mnt/sdb/ML/xmoto-gym/gym_xmoto/envs/xmoto_env.py", line 128, in step score = recognize_score(tmpState[1][0:0+30,100:100+30]) File "/mnt/sdb/ML/xmoto-gym/score_recognition.py", line 23, in recognize_score score_digits = preprocess_image(image) File "/mnt/sdb/ML/xmoto-gym/image_preprocessor.py", line 97, in preprocess_image for contour in contours: TypeError: 'NoneType' object is not iterable

rom1504 commented 5 years ago

what does imutils.is_cv2() return in your environment ?