【问题标题】:pywikibot fails to upload large filespywikibot 无法上传大文件
【发布时间】:2018-06-15 05:37:54
【问题描述】:

在 Google Compute Engine 服务器 (Linux instance-1 4.9.0-6-amd64 #1 SMP Debian 4.9.88-1+deb9u1 (2018-05-07) x86_64 GNU/Linux) 上,pywikibot 无法上传大文件并出现以下错误:

pywikibot.data.api.APIError: missingparam: One of the parameters "filekey", "file" and "url" is required. [help:See https://chinadigitaltimes.net/space/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce> for notice of API deprecations and breaking changes.] 1 pages read 0 pages written Script terminated successfully.

我需要上传最大 2GB 的文件。如何使用 pywikibot 做到这一点?

【问题讨论】:

  • 这个问题缺少很多参数。您需要确保您的 pywikibot 版本与您的 MediaWiki 版本兼容,并且您需要确保 php 的上传限制和内存限制足够高,以便服务器能够处理 2GB 上传。
  • 如果您需要更多帮助,请发布您的代码或命令行命令。

标签: mediawiki mediawiki-api pywikibot


【解决方案1】:

missingparam: One of the parameters "filekey", "file" and "url" is required. 错误表示服务器没有收到您要上传的文件。这是由服务器上的安全限制引起的,包括网络服务器软件(apache 或 nginx)和 PHP。有关说明,请参阅Configuring file uploads#Set maximum size for file uploads

【讨论】:

    猜你喜欢
    • 2013-08-24
    • 2019-01-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-01-29
    • 2023-04-11
    相关资源
    最近更新 更多