Met the error that "the URL does not map to a valid JSONWP resource"

I followed the following steps to setup Appium test environment on Windows 7/ Windows 10 on five computers but got the same error: WebDriverException: Message: The URL ‘/wb/hub/session’ did not map to a valid resource
Steps are as follows:

  1. Download latest node.js from official site and install it
  2. Download latest jdk from official site, install it and configure the system variables
  3. Download latest android SDK and configure system variables
  4. Download latest version ( of Appium and install it through appium-installer.exe. Also I tried to install it by using node.js on some machines
  5. Check system variables by using appium-doctor to ensure all required variables are set.
  6. Run appium through Appium GUI or command appium --session-override
  7. Run my test case as follows, but I got the error that “the URL ‘/wb/hub/session’ did not map to a valid resource”

My test case is as follows:
#!/usr/bin/env python
#-- coding:utf8 --
import unittest
from appium import webdriver

class OfficialAccountHistoryTest(unittest.TestCase):
def setUpClass(cls):
desired_caps = {}
desired_caps[‘platformName’] = ‘Android’
desired_caps[‘platformVersion’] = ‘4.4.4’
desired_caps[‘deviceName’] = ‘7C5922B03458’
desired_caps[‘appPackage’] = ‘’
desired_caps[‘appActivity’] = ‘’
desired_caps[‘unicodeKeyboard’] = True
desired_caps[‘resetKeyboard’] = True
desired_caps[‘fastReset’] = ‘false’
desired_caps[‘app’] = ‘D:/WeChat/weixin657android1040.apk’
desired_caps[‘fullReset’] = ‘false’
cls.driver = webdriver.Remote(‘’,desired_caps)

def tearDownClass(cls):

def test_openHistory(self):
    el = self.driver.find_element_by_id('')
    el = self.driver.find_element_by_id('')

if name == ‘maim’:
suite = unittest.TestLoader().loadTestsFromTestCase(OfficialAccountHistoryTest)

Test case log is as follows:
C:\Python27\python.exe “C:\Program Files (x86)\JetBrains\PyCharm 2016.3.2\helpers\pycharm\” D:\WeChat\ true
Testing started at 9:07 …

Traceback (most recent call last):
File “D:\WeChat\”, line 20, in setUpClass
cls.driver = webdriver.Remote(‘’,desired_caps)
File “C:\Python27\lib\site-packages\appium\webdriver\”, line 36, in init
super(WebDriver, self).init(command_executor, desired_capabilities, browser_profile, proxy, keep_alive)
File “C:\Python27\lib\site-packages\selenium\webdriver\remote\”, line 98, in init
self.start_session(desired_capabilities, browser_profile)
File “C:\Python27\lib\site-packages\selenium\webdriver\remote\”, line 185, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File “C:\Python27\lib\site-packages\selenium\webdriver\remote\”, line 249, in execute
File “C:\Python27\lib\site-packages\selenium\webdriver\remote\”, line 164, in check_response
raise exception_class(value)
WebDriverException: Message: The URL ‘/wb/hub/session’ did not map to a valid resource

Process finished with exit code 0

Appium log is as follows:
C:\Users\liuyuanhui>appium --session-override
[Appium] Welcome to Appium v1.6.4
[Appium] Non-default server args:
[Appium] sessionOverride: true
[Appium] Appium REST http interface listener started on
[HTTP] --> POST /wb/hub/session {"{“capabilities”: {“unicodeKeyboard”: true,
“fastReset”: “false”, “deviceName”: “7C5922B03458”, “platformName”:
“Android”, “app”: “D:/WeChat/weixin657android1040.apk”, “firstMatch”: ":[
[debug] [HTTP] No route found. Setting content type to ‘text/plain’
[HTTP] <-- POST /wb/hub/session 404 11 ms - 57

Investigations I did are as follows

  1. Read all answers from Google and Baidu but didn’t resolve this issue
  2. I am sure that no proxy is used on all my computers
  3. I turned fire wall and tried again, but no joy happens
  4. Use Python 2.7 or 3.x, but no joy happens
    Anyone can give me some suggestion? My android device is Hongmi whose android version is 4.4.4