protected GeneralCommandLine createCommandLine(Module module, List<String> params) throws ExecutionException {
    Sdk sdk = PythonSdkUtil.findPythonSdk(module);
    if (sdk == null) {
      throw new ExecutionException(PythonRestBundle.message("python.rest.no.sdk.specified"));
    }

    ReSTService service = ReSTService.getInstance(module);

    String sdkHomePath = sdk.getHomePath();

    GeneralCommandLine cmd = new GeneralCommandLine();
    if (sdkHomePath != null) {
      final String runnerName = "sphinx-quickstart" + (SystemInfo.isWindows ? ".exe" : "");
      String executablePath = PythonSdkUtil.getExecutablePath(sdkHomePath, runnerName);
      if (executablePath != null) {
        cmd.setExePath(executablePath);
      }
      else {
        cmd = PythonHelper.LOAD_ENTRY_POINT.newCommandLine(sdkHomePath, new ArrayList<>());
      }
    }

    cmd.setWorkDirectory(service.getWorkdir().isEmpty()? module.getProject().getBasePath(): service.getWorkdir());
    PythonCommandLineState.createStandardGroups(cmd);
    ParamsGroup scriptParams = cmd.getParametersList().getParamsGroup(PythonCommandLineState.GROUP_SCRIPT);
    assert scriptParams != null;

    if (params != null) {
      for (String p : params) {
        scriptParams.addParameter(p);
      }
    }

    final Map<String, String> env = cmd.getEnvironment();
    setPythonIOEncoding(env, "utf-8");
    setPythonUnbuffered(env);
    if (sdkHomePath != null) {
      resetHomePathChanges(sdkHomePath, env);
    }
    env.put("PYCHARM_EP_DIST", "Sphinx");
    env.put("PYCHARM_EP_NAME", "sphinx-quickstart");

    List<String> pathList = Lists.newArrayList(PythonCommandLineState.getAddedPaths(sdk));
    pathList.addAll(PythonCommandLineState.collectPythonPath(module));

    PythonCommandLineState.initPythonPath(cmd, true, pathList, sdkHomePath);

    PythonSdkType.patchCommandLineForVirtualenv(cmd, sdk);

    return cmd;
  }
protected GeneralCommandLine createCommandLine(Module module, List<String> params)