Answers.Body: <p>I was able to resolve the issue, it was because of inconsistency between using <code>gym</code> and <code>gymnasium</code>. Uniformly using <code>gymnasium</code> seems to resolve all issues.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-11-26T03:30:50.783Z
Answers.LastActivityDate: 2023-11-26T03:30:50.783Z
Answers.UserDisplayName: A J
Body: <p>While trying to use a created environment, I get the following error:
  <code>AssertionError: action space does not inherit from gym.spaces.Space, actual type: &lt;class 'gymnasium.spaces.discrete.Discrete'&gt;</code></p>
  <p>Does anyone know how to resolve this?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-11-26T22:43:46.770Z
Comments.Text: Hi. Programming questions or questions about specific software are off-topic here, so your question is off-topic here. We focus on the theory.
Comments.UserDisplayName: nbro
Tags: <gym>
Title: Error in action space for creating gymnasium environment
UserDisplayName: A J
ThreadText: # Error in action space for creating gymnasium environment
  
  (Asked by: username_0 on 2023-11-26)
  
  While trying to use a created environment, I get the following error:
  `AssertionError: action space does not inherit from gym.spaces.Space, actual type:`
  
  Does anyone know how to resolve this?
  
  **Tags:** gym
  > **Comments:**
  > **username_1**: Hi. Programming questions or questions about specific software are off-topic here, so your question is off-topic here. We focus on the theory.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2023-11-26. Score: 0 | Accepted answer
  
  I was able to resolve the issue, it was because of inconsistency between using `gym` and `gymnasium`. Uniformly using `gymnasium` seems to resolve all issues.
  
  
  ---
  
  