Aram created this task.
Aram added a project: Pywikibot.
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper.

TASK DESCRIPTION
  **Steps to replicate the issue**:
  
  - On ckbwiki, run `python pwb.py interwikidata.py -family:wikipedia -lang:ckb 
-page:"پەتای جیھانیی کۆڤید-١٩ لە سینگاپوور" -clean`
  
  **What happens?**:
  You will encounter these error messages. I believe the bot has a 2.93 MB 
limit for editing pages. The page at https://www.wikidata.org/wiki/Q83873387 is 
4 MB in size. The bot just stopped and was terminated due to an exception. 
Outputs:
  
    Adding link to Q83873387
    WARNING: API error rawmessage: The entity is too big. The maximum allowed 
entity size is 2.93 MB.
    
    1 read operation
    Execution time: 15 seconds
    Read operation time: 15.0 seconds
    Script terminated by exception:
    
    ERROR: Edit to page [[wikidata:Q83873387]] failed:
    rawmessage: The entity is too big. The maximum allowed entity size is 2.93 
MB.
    [messages: [{'name': 'wikibase-api-', 'parameters': ['The entity is too 
big. The maximum allowed entity size is 2.93 MB.'], 'html': {'*': 'The entity 
is too big. The maximum allowed entity size is 2.93 MB.'}}, {'name': 
'wikibase-error-entity-too-big', 'parameters': [{'size': 3072000}], 'html': 
{'*': 'The entity is too big. The maximum allowed entity size is ٢٫٩٣ 
مێگابایت.'}}];
     servedby: mw-api-ext.eqiad.main-cd859d9f6-pv2v4;
     help: See https://www.wikidata.org/w/api.php for API usage. Subscribe to 
the mediawiki-api-announce mailing list at 
<https://lists.wikimedia.org/postorius/lists/mediawiki-api-announce.lists.wikimedia.org/>
 for notice of API deprecations and breaking changes.] (OtherPageSaveError)
    Traceback (most recent call last):
      File "C:\Pywikibot\pywikibot\page\_decorators.py", line 32, in handle
        func(self, *args, **kwargs)
      File "C:\Pywikibot\pywikibot\page\_wikibase.py", line 812, in editEntity
        super().editEntity(data, **kwargs)
      File "C:\Pywikibot\pywikibot\page\_wikibase.py", line 325, in editEntity
        updates = self.repo.editEntity(
                  ^^^^^^^^^^^^^^^^^^^^^
      File "C:\Pywikibot\pywikibot\site\_decorators.py", line 93, in callee
        return fn(self, *args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Pywikibot\pywikibot\site\_datasite.py", line 334, in editEntity
        return req.submit()
               ^^^^^^^^^^^^
      File "C:\Pywikibot\pywikibot\data\api\_requests.py", line 1150, in submit
        raise pywikibot.exceptions.APIError(**error)
    pywikibot.exceptions.APIError: rawmessage: The entity is too big. The 
maximum allowed entity size is 2.93 MB.
    [messages: [{'name': 'wikibase-api-', 'parameters': ['The entity is too 
big. The maximum allowed entity size is 2.93 MB.'], 'html': {'*': 'The entity 
is too big. The maximum allowed entity size is 2.93 MB.'}}, {'name': 
'wikibase-error-entity-too-big', 'parameters': [{'size': 3072000}], 'html': 
{'*': 'The entity is too big. The maximum allowed entity size is ٢٫٩٣ 
مێگابایت.'}}];
     servedby: mw-api-ext.eqiad.main-cd859d9f6-pv2v4;
     help: See https://www.wikidata.org/w/api.php for API usage. Subscribe to 
the mediawiki-api-announce mailing list at 
<https://lists.wikimedia.org/postorius/lists/mediawiki-api-announce.lists.wikimedia.org/>
 for notice of API deprecations and breaking changes.]
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "C:\Pywikibot\pwb.py", line 40, in <module>
        sys.exit(main())
                 ^^^^^^
      File "C:\Pywikibot\pwb.py", line 36, in main
        runpy.run_path(str(path), run_name='__main__')
      File "<frozen runpy>", line 286, in run_path
      File "<frozen runpy>", line 98, in _run_module_code
      File "<frozen runpy>", line 88, in _run_code
      File "C:\Pywikibot\pywikibot\scripts\wrapper.py", line 521, in <module>
        main()
      File "C:\Pywikibot\pywikibot\scripts\wrapper.py", line 505, in main
        if not execute():
               ^^^^^^^^^
      File "C:\Pywikibot\pywikibot\scripts\wrapper.py", line 492, in execute
        run_python_file(filename, script_args, module)
      File "C:\Pywikibot\pywikibot\scripts\wrapper.py", line 149, in 
run_python_file
        exec(compile(source, filename, 'exec', dont_inherit=True),
      File "C:\Pywikibot\scripts\interwikidata.py", line 266, in <module>
        main()
      File "C:\Pywikibot\scripts\interwikidata.py", line 262, in main
        bot.run()
      File "C:\Pywikibot\pywikibot\bot.py", line 1582, in run
        self.treat(page)
      File "C:\Pywikibot\pywikibot\bot.py", line 1835, in treat
        self.treat_page()
      File "C:\Pywikibot\scripts\interwikidata.py", line 105, in treat_page
        item = self.try_to_add()
               ^^^^^^^^^^^^^^^^^
      File "C:\Pywikibot\scripts\interwikidata.py", line 207, in try_to_add
        item.setSitelink(self.current_page, summary='Added ' + (
      File "C:\Pywikibot\pywikibot\page\_wikibase.py", line 1255, in setSitelink
        self.setSitelinks([sitelink], **kwargs)
      File "C:\Pywikibot\pywikibot\page\_wikibase.py", line 1289, in 
setSitelinks
        self.editEntity(data, **kwargs)
      File "C:\Pywikibot\pywikibot\page\_decorators.py", line 52, in wrapper
        handle(func, self, *args, **kwargs)
      File "C:\Pywikibot\pywikibot\page\_decorators.py", line 44, in handle
        raise OtherPageSaveError(self, err)
    pywikibot.exceptions.OtherPageSaveError: Edit to page 
[[wikidata:Q83873387]] failed:
    rawmessage: The entity is too big. The maximum allowed entity size is 2.93 
MB.
    [messages: [{'name': 'wikibase-api-', 'parameters': ['The entity is too 
big. The maximum allowed entity size is 2.93 MB.'], 'html': {'*': 'The entity 
is too big. The maximum allowed entity size is 2.93 MB.'}}, {'name': 
'wikibase-error-entity-too-big', 'parameters': [{'size': 3072000}], 'html': 
{'*': 'The entity is too big. The maximum allowed entity size is ٢٫٩٣ 
مێگابایت.'}}];
     servedby: mw-api-ext.eqiad.main-cd859d9f6-pv2v4;
     help: See https://www.wikidata.org/w/api.php for API usage. Subscribe to 
the mediawiki-api-announce mailing list at 
&lt;https://lists.wikimedia.org/postorius/lists/mediawiki-api-announce.lists.wikimedia.org/&gt;
 for notice of API deprecations and breaking changes.]
    CRITICAL: Exiting due to uncaught exception OtherPageSaveError: Edit to 
page [[wikidata:Q83873387]] failed:
    rawmessage: The entity is too big. The maximum allowed entity size is 2.93 
MB.
    [messages: [{'name': 'wikibase-api-', 'parameters': ['The entity is too 
big. The maximum allowed entity size is 2.93 MB.'], 'html': {'*': 'The entity 
is too big. The maximum allowed entity size is 2.93 MB.'}}, {'name': 
'wikibase-error-entity-too-big', 'parameters': [{'size': 3072000}], 'html': 
{'*': 'The entity is too big. The maximum allowed entity size is ٢٫٩٣ 
مێگابایت.'}}];
     servedby: mw-api-ext.eqiad.main-cd859d9f6-pv2v4;
     help: See https://www.wikidata.org/w/api.php for API usage. Subscribe to 
the mediawiki-api-announce mailing list at 
&lt;https://lists.wikimedia.org/postorius/lists/mediawiki-api-announce.lists.wikimedia.org/&gt;
 for notice of API deprecations and breaking changes.]
  
  **What should have happened instead?**:
  I'm not sure whether to throw a warning message and skip the page, or just 
let the user edit the page at any cost. I could manually add the sitelink and 
then proceed with other pages, but we need to handle this error.
  
  **Software version**:
  9.3.1
  
  **Notes**:
  I'm not sure about the title of this ticket. Please feel free to change it to 
a better one if you think it could be improved.

TASK DETAIL
  https://phabricator.wikimedia.org/T373554

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Aram
Cc: Aklapper, pywikibot-bugs-list, Aram, mevo, PotsdamLamb, Jyoo1011, 
JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, 
Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, Xqt, jayvdb, 
Masti, Alchimista
_______________________________________________
pywikibot-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to