Page MenuHomePhabricator

integraality broken since Oct 28th (both interactive and command-line)
Closed, ResolvedPublic

Description

At some point during the day Integraality stopped being able to update https://www.wikidata.org/wiki/User:Alicia_Fagerving_(WMSE)/NM_coverage, even though it worked previously with the same configuration. I now get this error every time I try to update:

Traceback (most recent call last):

File "/data/project/integraality/www/python/src/app.py", line 29, in update processor.process_one_page(page_title)

File "./pages_processor.py", line 175, in process_one_page self.process_page(page)

File "./pages_processor.py", line 120, in process_page page.put(new_text, self.summary)

File "/data/project/integraality/www/python/venv/lib/python3.7/site-packages/pywikibot/tools/__init__.py", line 1475, in wrapper return obj(*__args, **__kw)

File "/data/project/integraality/www/python/venv/lib/python3.7/site-packages/pywikibot/tools/__init__.py", line 1475, in wrapper return obj(*__args, **__kw)

File "/data/project/integraality/www/python/venv/lib/python3.7/site-packages/pywikibot/page/__init__.py", line 1247, in put **kwargs)

File "/data/project/integraality/www/python/venv/lib/python3.7/site-packages/pywikibot/tools/__init__.py", line 1475, in wrapper return obj(*__args, **__kw)

File "/data/project/integraality/www/python/venv/lib/python3.7/site-packages/pywikibot/tools/__init__.py", line 1475, in wrapper return obj(*__args, **__kw)

File "/data/project/integraality/www/python/venv/lib/python3.7/site-packages/pywikibot/page/__init__.py", line 1173, in save cc=apply_cosmetic_changes, quiet=quiet, **kwargs)

File "/data/project/integraality/www/python/venv/lib/python3.7/site-packages/pywikibot/page/_decorators.py", line 50, in wrapper handle(func, self, *args, **kwargs)

File "/data/project/integraality/www/python/venv/lib/python3.7/site-packages/pywikibot/page/_decorators.py", line 29, in handle func(self, *args, **kwargs)

File "/data/project/integraality/www/python/venv/lib/python3.7/site-packages/pywikibot/page/__init__.py", line 1184, in _save watch=watch, bot=botflag, **kwargs)

File "/data/project/integraality/www/python/venv/lib/python3.7/site-packages/pywikibot/site/_decorators.py", line 93, in callee return fn(self, *args, **kwargs)

File "/data/project/integraality/www/python/venv/lib/python3.7/site-packages/pywikibot/site/_apisite.py", line 3263, in editpage token = self.tokens['edit']

File "/data/project/integraality/www/python/venv/lib/python3.7/site-packages/pywikibot/site/_tokenwallet.py", line 58, in __getitem__ key = self.site.validate_tokens([key])[0]

File "/data/project/integraality/www/python/venv/lib/python3.7/site-packages/pywikibot/site/_apisite.py", line 1516, in validate_tokens 'token')['type']

TypeError: 'NoneType' object is not subscriptable

Event Timeline

:-(

I must have broken something when deploying 0a8e7fb8...

I rollbacked all recent changes − no luck :-(

JeanFred renamed this task from Error when trying to update a dashboard to integraality broken since Oct 28th (both interactive and command-line).Oct 28 2021, 8:06 PM

So what happened is:

  • Today I deployed a bunch of commits (all tested locally in the docker-compose setup)
  • When deploying 0a8e7fb8, I encountered failure on dashboards using the new grouping_type, as if the new parameter was not recognized.
  • Assuming some caching issues I:
    • restarted, stopped, and started the webservice several times
    • purged the __pycache__ folder and files (several times)
  • Added some debugging print statements on the server

Since Alicia’s bug report I:

  • Removed the debugging print statements
  • Rollbacked (via get checkout HEAD~1 etc.) recent changes one by one
  • Purged the cache and restarted the webservice many times

The failure is still there. I have no clue why.

(The reason for the exception seems to be that page.put(new_text, self.summary) fails if new_text is None. Ok, fair enough − I should catch that I guess ; but I have no clue why this should start to happen suddenly...

And I still can’t reproduce locally. All updates done locally are working.

@LucasWerkmeister on Telegram

I think you might need to upgrade to Pywikibot 6.6.1 or later? earlier versions used a deprecated method of getting API tokens, which was disabled at some point in Wikimedia (same error message at T291202)

Mentioned in SAL (#wikimedia-cloud) [2021-10-29T09:16:10Z] <wm-bot> <jeanfred> Install requirements in py37 venv (T294570)

Mentioned in SAL (#wikimedia-cloud) [2021-10-29T09:28:25Z] <wm-bot> <jeanfred> Deploy 2260c8f (follow up to T294570)

My dashboards are updated! 🎉 Thank you!

JeanFred claimed this task.

Both the interactive and command-line updates are working! Yay! 🎉

Thanks @Alicia_Fagerving_WMSE for the reports − and for being such a dedicated user :)