处理 Scopus400pybliometrics 错误:超出最大查询限制

问题描述 投票:0回答:1

我正在使用

pybliometrics
库使用复杂的查询在 Scopus 数据库中搜索一系列出版年份。但是,当我运行脚本时,我遇到一个
Scopus400Error
,表明我已经超出了服务级别允许的最大数量。这是似乎导致问题的代码部分:

x = ScopusSearch(
    f'PUBYEAR IS {year} AND TITLE ( "ethanol upgrading" OR "Guerbet" OR "Lebedev" OR "ethanol to" ) AND NOT TITLE ( "reforming" OR "electrocatalysis" OR "photocatalysis" OR "homogeneous") AND TITLE-ABS-KEY ( "1-butanol" OR "1,3-butadiene" OR "n-butanol" OR "butadiene" OR "higher alcohols" OR "Guerbet" OR "Lebedev" OR "diethyl ether" OR "BTX" OR "buetenes" OR "butene" OR "Isobutene" ) AND SUBJAREA ( ceng OR chem OR ener OR engi OR envi OR mate ) AND NOT SUBJAREA ( medi OR nurs OR vete OR dent OR heal OR mult ) AND NOT SUBJAREA ( agri OR bioc OR immu OR neur OR phar ) AND NOT SUBJAREA ( arts OR busi OR deci OR econ OR psyc OR soci ) AND NOT SUBJAREA ( phys OR math ) AND DOCTYPE ( "AR" ) AND SRCTYPE ( j ) ',
    view="STANDARD")

这是错误消息:

pybliometrics.scopus.exception.Scopus400Error: Exceeds the maximum number allowed for the service level

我怀疑该问题可能与查询的复杂性或长度有关。我尝试使用相同的查询完全按照作者提供的方式运行脚本,但仍然遇到问题。值得注意的是,今天早些时候,该脚本似乎确实运行了几次,因为它不断进展,然后请求 API。如何修改查询或管理搜索以避免达到此限制?有没有办法将查询分解为更小的部分或调整服务级别?

这里是相关 GitHub 存储库的链接和 YouTube 视频,详细解释了项目设置和目标。

python jquery api error-handling pybliometrics
1个回答
0
投票

我快速谷歌了一下,看来这个错误意味着你的查询搞砸了。

pybliometrics.scopus.exception.Scopus400Error:错误请求:通常是无效的搜索查询,例如缺少括号。验证您的查询在高级搜索中是否有效。

我怀疑您在查询的部分内容中缺少引号。如果没有引号,sql 引擎很可能会尝试将它们映射到字段名称。

AND SUBJAREA ( ceng OR chem OR ener OR engi OR envi OR mate )
AND NOT SUBJAREA ( medi OR nurs OR vete OR dent OR heal OR mult )
AND NOT SUBJAREA ( agri OR bioc OR immu OR neur OR phar )
AND NOT SUBJAREA ( arts OR busi OR deci OR econ OR psyc OR soci )
AND NOT SUBJAREA ( phys OR math )

应该是:

AND SUBJAREA ( "ceng" OR "chem" OR "ener" OR "engi" OR "envi" OR "mate" )
AND NOT SUBJAREA ( "medi" OR "nurs" OR "vete" OR "dent" OR "heal" OR "mult" )
AND NOT SUBJAREA ( "agri" OR "bioc" OR "immu" OR "neur" OR "phar" )
AND NOT SUBJAREA ( "arts" OR "busi" OR "deci" OR "econ" OR "psyc" OR "soci" )
AND NOT SUBJAREA ( "phys" OR "math" )

AND SRCTYPE ( j )
应该是
AND SRCTYPE ( "j" )

© www.soinside.com 2019 - 2024. All rights reserved.