title: Selenium for python KeyError: None
body: <pre><code>   I want to do move button at some description。
  </code></pre>
  
  <p>Then is my code:</p>
  
  <pre><code> action_chains = ActionChains(self.driver)
      while move_x_sum &lt; offset_x - 10:
          move_x = random.randint(5, 10)
          action_chains.move_to_element_with_offset(
              to_element=move_button,
              xoffset=move_x,
              yoffset=offset_y).click_and_hold(move_button).pause(float(random.randint(300, 500) / 1000))
          # time.sleep(float(random.randint(300, 500) / 1000))
          # action_chains.pause(random.randint(300, 500) / 1000)
          move_x_sum += move_x
      action_chains.move_to_element_with_offset(
          to_element=move_button,
          xoffset=offset_x - move_x_sum,
          yoffset=offset_y)
      action_chains.perform()
  </code></pre>
  
  <p>when run to action_chains.perform().It throws a exception.</p>
  
  <p>On line :</p>
  
  <pre><code>action_chains.perform()
  </code></pre>
  
  <p>Error Stack Trace :</p>
  
  <pre><code>  File "/Library/Python/2.7/site-packages/selenium/webdriver/common/action_chains.py", line 83, in perform
      action()
    File "/Library/Python/2.7/site-packages/selenium/webdriver/common/action_chains.py", line 323, in &lt;lambda&gt;
      time.sleep(seconds)
    File "/Library/Python/2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 306, in execute
      response = self.command_executor.execute(driver_command, params)
    File "/Library/Python/2.7/site-packages/selenium/webdriver/remote/remote_connection.py", line 459, in execute
      command_info = self._commands[command]
  KeyError: None
  </code></pre>
  
  <p>How can I do?</p>