Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RuntimeError: maximum recursion depth exceeded #23

Closed
ryszard314159 opened this issue Jun 4, 2015 · 1 comment
Closed

RuntimeError: maximum recursion depth exceeded #23

ryszard314159 opened this issue Jun 4, 2015 · 1 comment

Comments

@ryszard314159
Copy link

I encountered the problem after running WikiExtractor.py on a wiki dump for extended period of time (few days).

$ uname -a
Darwin imac.home 13.4.0 Darwin Kernel Version 13.4.0: Wed Dec 17 19:05:52 PST 2014; root:xnu-2422.115.10~1/RELEASE_X86_64 x86_64
$
$ ls -l ~/Downloads/enwiki-latest-pages-articles.xml.bz2
-rw-r-----@ 1 ryszard 501 11935745192 May 31 19:13 /Users/ryszard/Downloads/enwiki-latest-pages-articles.xml.bz
$
$ ~/util/Python/WikiExtractor.py -c -o extracted ~/Downloads/enwiki-latest-pages-articles.xml.bz2
[...]
INFO: 21637400 1976 American Airlines Tennis Games – Doubles
INFO: 21637471 Missouri River Runner
INFO: 21637508 Angelika Knipping
INFO: 21637520 List of reporters for ITV News
INFO: 21637542 Rizzani de Eccher
Exception in thread Thread-1:
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 808, in bootstrap_inner
self.run()
File "/Users/ryszard/util/Python/WikiExtractor.py", line 2335, in run
job.extract(self._splitter)
[...]
[... many lines deleted ...]
[...]
instantiated = template.subst(params, self)
File "/Users/ryszard/util/Python/WikiExtractor.py", line 301, in subst
return ''.join([tpl.subst(params, extractor, depth) for tpl in self])
File "/Users/ryszard/util/Python/WikiExtractor.py", line 351, in subst
paramName = self.name.subst(params, extractor, depth+1)
File "/Users/ryszard/util/Python/WikiExtractor.py", line 294, in subst
logging.debug('subst tpl (%d, %d) %s', len(extractor.frame), depth, self)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/__init
.py", line 1619, in debug
root.debug(msg, _args, *_kwargs)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/init.py", line 1136, in debug
if self.isEnabledFor(DEBUG):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/init.py", line 1348, in isEnabledFor
return level >= self.getEffectiveLevel()
RuntimeError: maximum recursion depth exceeded

@attardi
Copy link
Owner

attardi commented Jun 4, 2015

This problem has been fixed in version 2.34.

Article n. 21637542 uses the template:

{{OTRS|celebrative|date=April 2015}}

which contains a recursive call to itself:

{{tmbox
|type=content
|image=[[Image:OTRS Wikimedia.svg|75px|OTRS icon]]
|text=This article is the subject of a request emailed to the [[Wikipedia:Volunteer Response Team|Wikimedia Volunteer Response Team]].<br />
Issues identified are: ''{{{issue|issue=please give a specific explanation like this: <nowiki>{{OTRS|what needs to be done}}</nowiki>}}}'''''<br />
The OTRS ticket number is [https://ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketSearch&Subaction=Search&TicketNumber={{{otrs|''otrs=please insert OTRS ticket number here''}}} {{{otrs}}}].<br />
{{#ifeq: {{{discuss| }}}|{{{discuss|no}}}| |<span style="font-size: 90%">
Please discuss these issues here, being mindful of the policies on [[Wikipedia:Biographies of living persons|biographies of living persons]].</span>}}
}}

It is clearly a malformed template.

@attardi attardi closed this as completed Jun 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants