Page MenuHomePhabricator

category_redirect Exiting due to uncaught exception: MemoryError
Closed, InvalidPublicBUG REPORT

Description

category_redirect.py is stopping with the following error:

Traceback (most recent call last):
  File "/data/project/alchimista/bots/alch/pwb.py", line 256, in <module>
    if not main():
  File "/data/project/alchimista/bots/alch/pwb.py", line 250, in main
    run_python_file(filename, [filename] + args, argvu, file_package)
  File "/data/project/alchimista/bots/alch/pwb.py", line 121, in run_python_file
    main_mod.__dict__)
  File "/data/project/shared/pywikibot/stable/scripts/category_redirect.py", line 526, in <module>
    main()
  File "/data/project/shared/pywikibot/stable/scripts/category_redirect.py", line 522, in main
    bot.run()
  File "/data/project/shared/pywikibot/stable/scripts/category_redirect.py", line 495, in run
    self.log_page.save(comment)
  File "/shared/pywikipedia/core/pywikibot/tools/__init__.py", line 1449, in wrapper
    
  File "/shared/pywikipedia/core/pywikibot/tools/__init__.py", line 1449, in wrapper
    
  File "/shared/pywikipedia/core/pywikibot/page/__init__.py", line 1299, in save
    if not force and not self.botMayEdit():
  File "/shared/pywikipedia/core/pywikibot/page/__init__.py", line 1158, in botMayEdit
    templates = self.templatesWithParams()
  File "/shared/pywikipedia/core/pywikibot/tools/__init__.py", line 1449, in wrapper
    
  File "/shared/pywikipedia/core/pywikibot/page/__init__.py", line 2360, in templatesWithParams
    templates = self.raw_extracted_templates
  File "/shared/pywikipedia/core/pywikibot/page/__init__.py", line 2335, in raw_extracted_templates
    self.text, True, True)
  File "/shared/pywikipedia/core/pywikibot/textlib.py", line 1657, in extract_templates_and_params
    return extract_templates_and_params_mwpfh(text, strip)
  File "/shared/pywikipedia/core/pywikibot/textlib.py", line 1675, in extract_templates_and_params_mwpfh
    code = mwparserfromhell.parse(text)
  File "/shared/pywikipedia/core/mwparserfromhell/utils.py", line 58, in parse_anything
    return Parser().parse(value, context, skip_style_tags)
  File "/shared/pywikipedia/core/mwparserfromhell/parser/__init__.py", line 93, in parse
    tokens = self._tokenizer.tokenize(text, context, skip_style_tags)
  File "/shared/pywikipedia/core/mwparserfromhell/parser/tokenizer.py", line 1459, in tokenize
    tokens = self._parse(context)
  File "/shared/pywikipedia/core/mwparserfromhell/parser/tokenizer.py", line 1337, in _parse
    self._parse_wikilink()
  File "/shared/pywikipedia/core/mwparserfromhell/parser/tokenizer.py", line 328, in _parse_wikilink
    link, extra, delta = self._really_parse_external_link(True)
  File "/shared/pywikipedia/core/mwparserfromhell/parser/tokenizer.py", line 453, in _really_parse_external_link
    self._parse_bracketed_uri_scheme()
  File "/shared/pywikipedia/core/mwparserfromhell/parser/tokenizer.py", line 387, in _parse_bracketed_uri_scheme
    self._fail_route()
  File "/shared/pywikipedia/core/mwparserfromhell/parser/tokenizer.py", line 162, in _fail_route
    self._memoize_bad_route()
  File "/shared/pywikipedia/core/mwparserfromhell/parser/tokenizer.py", line 153, in _memoize_bad_route
    self._bad_routes.add(self._stack_ident)
MemoryError
CRITICAL: Exiting due to uncaught exception <class 'MemoryError'>

Event Timeline

JJMC89 updated the task description. (Show Details)
zhuyifei1999 added a subscriber: zhuyifei1999.

Memory issues are environmental. They are not actionable unless a. there is a memory leak or b. there is a significant memory use inefficiency.