小编Han*_*nes的帖子

为什么在 Python 中使用 requests 模块时会出现 ChunkedEncodingError 错误?

https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi 我尝试使用这些参数查询此 API?db=mesh&id=68016019 所以整个 URL 是https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=mesh&id=68016019 在 Postman 中执行此操作时一切正常并且输出符合预期:

1: Survival Analysis
A class of statistical procedures for estimating the survival function (function 
of time, starting with a population 100% well at a given time and providing the
percentage of the population still well at later times). The survival analysis is
then used for making inferences about the effects of treatments, prognostic
etc.
*
*
*
Run Code Online (Sandbox Code Playgroud)

但是当我尝试通过 Python 中的 requests 模块查询时,我收到此错误:

("Connection broken: InvalidChunkLength(got length b'', 0 bytes …
Run Code Online (Sandbox Code Playgroud)

python pubmed python-requests

2
推荐指数
1
解决办法
4337
查看次数

标签 统计

pubmed ×1

python ×1

python-requests ×1