Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/301.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python Core Analytics API 3最大结果和开始索引语法错误:关键字can';这不是一种表达_Python_Google Analytics Api - Fatal编程技术网

Python Core Analytics API 3最大结果和开始索引语法错误:关键字can';这不是一种表达

Python Core Analytics API 3最大结果和开始索引语法错误:关键字can';这不是一种表达,python,google-analytics-api,Python,Google Analytics Api,我正在尝试复制 但我想包括最大结果和开始索引 property_links = analytics.management().webpropertyUserLinks().list( accountId='123456', webPropertyId='UA-123456-1', start-index = 2, max-results = 10000 ).execute() 但它不起作用。我得到一个错误:SyntaxError:keywor

我正在尝试复制

但我想包括最大结果和开始索引

property_links = analytics.management().webpropertyUserLinks().list(
      accountId='123456',
      webPropertyId='UA-123456-1',
      start-index = 2,
      max-results = 10000
  ).execute()
但它不起作用。我得到一个错误:SyntaxError:keyword不能是表达式

如何在查询中使用起始索引和最大结果?
谢谢大家!

我不知道这是对还是错,但检查了谷歌API。我发现您的请求和实际的google try me示例之间存在一些差异。请尝试下面的语法。让我们看看它是否起作用

gapi.client.analytics.management.webpropertyUserLinks.list({
    "accountId": "157374703",
    "webPropertyId": "UA-84036103-1",
    "max-results": 10000,
    "start-index": 2
})