recursion errors

Bug #1221891 reported by Marten de Vries
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenTeacher
Fix Released
Medium
Marten de Vries

Bug Description

With two developer commands that run over all modules, Python throws a RuntimeError (max recursion depth exceeded). Increasing sys.setrecursionlimit() by a factor of 10 didn't help, so probably there's some circular reference.

For the commands + output, see the comments.

Revision history for this message
Marten de Vries (marten-de-vries) wrote :
Download full text (16.0 KiB)

marten@marten-laptop:~/bzr/3.x$ python openteacher.py -p update-rosetta
This updates the priorities and template paths of the translations of OpenTeacher on Launchpad. If you're not in the ~openteachermaintainers team, continuing will probably crash or do nothing. Continue? (y/n) y
Traceback (most recent call last):
  File "openteacher.py", line 62, in <module>
    sys.exit(app.run())
  File "openteacher.py", line 49, in run
    mods.pop().execute()
  File "modules/org/openteacher/logic/execute/execute.py", line 142, in execute
    self.startRunning.send()
  File "modules/org/openteacher/logic/event/event.py", line 35, in send
    handler(*args, **kwargs)
  File "modules/org/openteacher/profileRunners/rosettaUpdater/rosettaUpdater.py", line 94, in _run
    priority = self._modPriority(mod)
  File "modules/org/openteacher/profileRunners/rosettaUpdater/rosettaUpdater.py", line 124, in _modPriority
    priority += self._modPriority(otherMod)
  File "modules/org/openteacher/profileRunners/rosettaUpdater/rosettaUpdater.py", line 127, in _modPriority
    priority += int(round(0.75 * self._modPriority(otherMod)))
  File "modules/org/openteacher/profileRunners/rosettaUpdater/rosettaUpdater.py", line 127, in _modPriority
    priority += int(round(0.75 * self._modPriority(otherMod)))
  File "modules/org/openteacher/profileRunners/rosettaUpdater/rosettaUpdater.py", line 127, in _modPriority
    priority += int(round(0.75 * self._modPriority(otherMod)))
  File "modules/org/openteacher/profileRunners/rosettaUpdater/rosettaUpdater.py", line 127, in _modPriority
    priority += int(round(0.75 * self._modPriority(otherMod)))
  File "modules/org/openteacher/profileRunners/rosettaUpdater/rosettaUpdater.py", line 127, in _modPriority
    priority += int(round(0.75 * self._modPriority(otherMod)))
  File "modules/org/openteacher/profileRunners/rosettaUpdater/rosettaUpdater.py", line 127, in _modPriority
    priority += int(round(0.75 * self._modPriority(otherMod)))
  File "modules/org/openteacher/profileRunners/rosettaUpdater/rosettaUpdater.py", line 127, in _modPriority
    priority += int(round(0.75 * self._modPriority(otherMod)))
  File "modules/org/openteacher/profileRunners/rosettaUpdater/rosettaUpdater.py", line 127, in _modPriority
    priority += int(round(0.75 * self._modPriority(otherMod)))
  File "modules/org/openteacher/profileRunners/rosettaUpdater/rosettaUpdater.py", line 127, in _modPriority
    priority += int(round(0.75 * self._modPriority(otherMod)))
  File "modules/org/openteacher/profileRunners/rosettaUpdater/rosettaUpdater.py", line 127, in _modPriority
    priority += int(round(0.75 * self._modPriority(otherMod)))
  File "modules/org/openteacher/profileRunners/rosettaUpdater/rosettaUpdater.py", line 127, in _modPriority
    priority += int(round(0.75 * self._modPriority(otherMod)))
  File "modules/org/openteacher/profileRunners/rosettaUpdater/rosettaUpdater.py", line 127, in _modPriority
    priority += int(round(0.75 * self._modPriority(otherMod)))
  File "modules/org/openteacher/profileRunners/rosettaUpdater/rosettaUpdater.py", line 127, in _modPriority
    priority += int(round(0.75 * self._modPriority(otherMod)))
  File "modules/org/open...

Revision history for this message
Marten de Vries (marten-de-vries) wrote :
Download full text (18.1 KiB)

marten@marten-laptop:~/bzr/3.x$ python openteacher.py -p test-suite all
....................<testRunner.TestRunnerModule object at 0x856af50>
E......................................................................................................E.................................................................................................s............................................
======================================================================
ERROR: testWithFullDependencies (moduleManagerTest.TestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "modules/org/openteacher/misc/moduleManagerTest/moduleManagerTest.py", line 148, in testWithFullDependencies
    self._doTest(False)
  File "modules/org/openteacher/misc/moduleManagerTest/moduleManagerTest.py", line 131, in _doTest
    success, enabledMods = self._enableIncludingDependenciesIfNotActive(mod, minimalDependencies)
  File "modules/org/openteacher/misc/moduleManagerTest/moduleManagerTest.py", line 47, in _enableIncludingDependenciesIfNotActive
    return self._enableIncludingDependencies(mod, minimalDependencies)
  File "modules/org/openteacher/misc/moduleManagerTest/moduleManagerTest.py", line 50, in _enableIncludingDependencies
    success, enabledMods = self._enableDependencies(mod, minimalDependencies)
  File "modules/org/openteacher/misc/moduleManagerTest/moduleManagerTest.py", line 74, in _enableDependencies
    success, enabledMods = self._enableDependencySelector(selector, minimalDependencies, enabledMods)
  File "modules/org/openteacher/misc/moduleManagerTest/moduleManagerTest.py", line 80, in _enableDependencySelector
    subSuccess, otherMods = self._enableIncludingDependenciesIfNotActive(requirement, minimalDependencies)
  File "modules/org/openteacher/misc/moduleManagerTest/moduleManagerTest.py", line 47, in _enableIncludingDependenciesIfNotActive
    return self._enableIncludingDependencies(mod, minimalDependencies)
  File "modules/org/openteacher/misc/moduleManagerTest/moduleManagerTest.py", line 50, in _enableIncludingDependencies
    success, enabledMods = self._enableDependencies(mod, minimalDependencies)
  File "modules/org/openteacher/misc/moduleManagerTest/moduleManagerTest.py", line 74, in _enableDependencies
    success, enabledMods = self._enableDependencySelector(selector, minimalDependencies, enabledMods)
  File "modules/org/openteacher/misc/moduleManagerTest/moduleManagerTest.py", line 80, in _enableDependencySelector
    subSuccess, otherMods = self._enableIncludingDependenciesIfNotActive(requirement, minimalDependencies)
  File "modules/org/openteacher/misc/moduleManagerTest/moduleManagerTest.py", line 47, in _enableIncludingDependenciesIfNotActive
    return self._enableIncludingDependencies(mod, minimalDependencies)
  File "modules/org/openteacher/misc/moduleManagerTest/moduleManagerTest.py", line 50, in _enableIncludingDependencies
    success, enabledMods = self._enableDependencies(mod, minimalDependencies)
  File "modules/org/openteacher/misc/moduleManagerTest/moduleManagerTest.py", line 74, in _enableDependencies
    success, enabledMods = self._enableDependencySelector(sele...

Revision history for this message
Marten de Vries (marten-de-vries) wrote :

Also in the code documentation, which is more annoying. Priority ++
ERROR:cherrypy.error.75405392:[08/Sep/2013:15:56:51] HTTP Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/cherrypy/_cprequest.py", line 656, in respond
    response.body = self.handler()
  File "/usr/lib/python2.7/dist-packages/cherrypy/lib/encoding.py", line 188, in __call__
    self.body = self.oldhandler(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/cherrypy/_cpdispatch.py", line 34, in __call__
    return self.callable(*self.args, **self.kwargs)
  File "modules/org/openteacher/profileRunners/codeDocs/codeDocs.py", line 279, in dev_docs
    return self._renderRstPage(path)
  File "modules/org/openteacher/profileRunners/codeDocs/codeDocs.py", line 255, in _renderRstPage
    "initial_header_level": 2
  File "/usr/lib/python2.7/dist-packages/docutils/core.py", line 448, in publish_parts
    enable_exit_status=enable_exit_status)
  File "/usr/lib/python2.7/dist-packages/docutils/core.py", line 659, in publish_programmatically
    settings_spec, settings_overrides, config_section)
  File "/usr/lib/python2.7/dist-packages/docutils/core.py", line 141, in process_programmatic_settings
    **defaults)
  File "/usr/lib/python2.7/dist-packages/docutils/core.py", line 128, in get_settings
    usage, description, settings_spec, config_section, **defaults)
  File "/usr/lib/python2.7/dist-packages/docutils/core.py", line 115, in setup_option_parser
    usage=usage, description=description)
  File "/usr/lib/python2.7/dist-packages/docutils/frontend.py", line 569, in __init__
    config_settings = self.get_standard_config_settings()
  File "/usr/lib/python2.7/dist-packages/docutils/frontend.py", line 628, in get_standard_config_settings
    settings.update(self.get_config_file_settings(filename), self)
  File "/usr/lib/python2.7/dist-packages/docutils/frontend.py", line 633, in get_config_file_settings
    parser = ConfigParser()
  File "/usr/lib/python2.7/dist-packages/docutils/frontend.py", line 724, in __init__
    CP.RawConfigParser.__init__(self, *args, **kwargs)
  File "/usr/lib/python2.7/ConfigParser.py", line 235, in __init__
    self._sections = self._dict()
  File "/usr/lib/python2.7/collections.py", line 52, in __init__
    self.__update(*args, **kwds)
  File "/usr/lib/python2.7/_abcoll.py", line 540, in update
    if isinstance(other, Mapping):
  File "/usr/lib/python2.7/abc.py", line 144, in __instancecheck__
    return cls.__subclasscheck__(subtype)
  File "/usr/lib/python2.7/abc.py", line 180, in __subclasscheck__
    if issubclass(subclass, scls):
  File "/usr/lib/python2.7/abc.py", line 180, in __subclasscheck__
    if issubclass(subclass, scls):
  File "/usr/lib/python2.7/abc.py", line 180, in __subclasscheck__
    if issubclass(subclass, scls):
  File "/usr/lib/python2.7/abc.py", line 174, in __subclasscheck__
    for rcls in cls._abc_registry:
  File "/usr/lib/python2.7/_weakrefset.py", line 59, in __iter__
    with _IterationGuard(self):
RuntimeError: maximum recursion depth exceeded

Changed in openteacher:
importance: Low → Medium
Revision history for this message
Marten de Vries (marten-de-vries) wrote :

Ok, so actually the last is a separate bug. The others are fixed now...

Revision history for this message
Marten de Vries (marten-de-vries) wrote :

The last being the same as the bug marked as a duplicate today.

Revision history for this message
Marten de Vries (marten-de-vries) wrote :

And fixed the last one too. Probably not caused by cherrypy, but I did port away from cherrypy to flask in the meantime because I thought so first. Let's call it a nice bonus. :P

Changed in openteacher:
assignee: nobody → Marten de Vries (marten-de-vries)
status: Confirmed → Fix Released
milestone: none → 3.3
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.