#164 — Infinite Recursion on generation
by
Matt Bowen
—
last modified
Jan 07, 2009 10:02 AM
| State | In progress |
|---|---|
| Version: | 2.0 |
| Area | Functionality |
| Issue type | Bug |
| Severity | Medium |
| Submitted by | Matt Bowen |
| Submitted on | Nov 21, 2007 |
| Responsible |
—
|
| Target release: |
—
|
When generating fresh code from a model with AGX Revision 8954 (https://dev.plone.org/archetypes/changeset/8954), a "RuntimeError: maximum recursion depth exceeded" is raised. Full traceback is pasted below:
rm_1231:~/Sites/ncpc-buildout/products/ncpcNewsletter/models webdev$ ArchGenXML ncpcNewsletter.zuml -o../
INFO ArchGenXML Version 2.0-beta8 (dev/svn)
(c) 2003-2007 BlueDynamics, Austria, GNU General Public License 2.0 or later
INFO Parsing...
WARNING Not setting the product's name to '..', this was the old behaviour. Just name your class diagram according to your product name.
INFO Directory in which we're generating the files: '..'.
INFO Generating...
WARNING Can't build i18n message catalog. Module 'i18ndude' not found.
INFO Starting new Product: 'ncpcNewsletter'.
Traceback (most recent call last):
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/Current/bin/ArchGenXML", line 7, in ?
sys.exit(
File "/Users/webdev/Documents/ArchGenXML/src/archgenxml/ArchGenXML.py", line 107, in main
gen.parseAndGenerate()
File "/Users/webdev/Documents/ArchGenXML/src/archgenxml/ArchetypesGenerator.py", line 3752, in parseAndGenerate
self.generateProduct(root)
File "/Users/webdev/Documents/ArchGenXML/src/archgenxml/ArchetypesGenerator.py", line 3642, in generateProduct
self.generateSkinsDirectories(root)
File "/Users/webdev/Documents/ArchGenXML/src/archgenxml/ArchetypesGenerator.py", line 3597, in generateSkinsDirectories
self.makeDir(root.getFilePath())
File "/Users/webdev/Documents/ArchGenXML/src/archgenxml/ArchetypesGenerator.py", line 249, in makeDir
return utils.makeDir(ffn, force=force)
File "/Users/webdev/Documents/ArchGenXML/src/archgenxml/utils.py", line 76, in makeDir
makeDir(parent,force=force)
...
File "/Users/webdev/Documents/ArchGenXML/src/archgenxml/utils.py", line 76, in makeDir
makeDir(parent,force=force)
File "/Users/webdev/Documents/ArchGenXML/src/archgenxml/utils.py", line 71, in makeDir
log.debug("Trying to make directory '%s' (force=%s).", directoryName, force)
File "/Library/Frameworks/Python.framework/Versions/2.4//lib/python2.4/logging/__init__.py", line 955, in debug
apply(self._log, (DEBUG, msg, args), kwargs)
File "/Library/Frameworks/Python.framework/Versions/2.4//lib/python2.4/logging/__init__.py", line 1079, in _log
self.handle(record)
File "/Library/Frameworks/Python.framework/Versions/2.4//lib/python2.4/logging/__init__.py", line 1089, in handle
self.callHandlers(record)
File "/Library/Frameworks/Python.framework/Versions/2.4//lib/python2.4/logging/__init__.py", line 1126, in callHandlers
hdlr.handle(record)
File "/Library/Frameworks/Python.framework/Versions/2.4//lib/python2.4/logging/__init__.py", line 642, in handle
self.emit(record)
File "/Library/Frameworks/Python.framework/Versions/2.4//lib/python2.4/logging/__init__.py", line 744, in emit
self.handleError(record)
File "/Library/Frameworks/Python.framework/Versions/2.4//lib/python2.4/logging/__init__.py", line 693, in handleError
traceback.print_exception(ei[0], ei[1], ei[2], None, sys.stderr)
File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/traceback.py", line 125, in print_exception
print_tb(tb, limit, file)
File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/traceback.py", line 67, in print_tb
' File "%s", line %d, in %s' % (filename,lineno,name))
RuntimeError: maximum recursion depth exceeded
rm_1231:~/Sites/ncpc-buildout/products/ncpcNewsletter/models webdev$ ArchGenXML ncpcNewsletter.zuml -o../
INFO ArchGenXML Version 2.0-beta8 (dev/svn)
(c) 2003-2007 BlueDynamics, Austria, GNU General Public License 2.0 or later
INFO Parsing...
WARNING Not setting the product's name to '..', this was the old behaviour. Just name your class diagram according to your product name.
INFO Directory in which we're generating the files: '..'.
INFO Generating...
WARNING Can't build i18n message catalog. Module 'i18ndude' not found.
INFO Starting new Product: 'ncpcNewsletter'.
Traceback (most recent call last):
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/Current/bin/ArchGenXML", line 7, in ?
sys.exit(
File "/Users/webdev/Documents/ArchGenXML/src/archgenxml/ArchGenXML.py", line 107, in main
gen.parseAndGenerate()
File "/Users/webdev/Documents/ArchGenXML/src/archgenxml/ArchetypesGenerator.py", line 3752, in parseAndGenerate
self.generateProduct(root)
File "/Users/webdev/Documents/ArchGenXML/src/archgenxml/ArchetypesGenerator.py", line 3642, in generateProduct
self.generateSkinsDirectories(root)
File "/Users/webdev/Documents/ArchGenXML/src/archgenxml/ArchetypesGenerator.py", line 3597, in generateSkinsDirectories
self.makeDir(root.getFilePath())
File "/Users/webdev/Documents/ArchGenXML/src/archgenxml/ArchetypesGenerator.py", line 249, in makeDir
return utils.makeDir(ffn, force=force)
File "/Users/webdev/Documents/ArchGenXML/src/archgenxml/utils.py", line 76, in makeDir
makeDir(parent,force=force)
...
File "/Users/webdev/Documents/ArchGenXML/src/archgenxml/utils.py", line 76, in makeDir
makeDir(parent,force=force)
File "/Users/webdev/Documents/ArchGenXML/src/archgenxml/utils.py", line 71, in makeDir
log.debug("Trying to make directory '%s' (force=%s).", directoryName, force)
File "/Library/Frameworks/Python.framework/Versions/2.4//lib/python2.4/logging/__init__.py", line 955, in debug
apply(self._log, (DEBUG, msg, args), kwargs)
File "/Library/Frameworks/Python.framework/Versions/2.4//lib/python2.4/logging/__init__.py", line 1079, in _log
self.handle(record)
File "/Library/Frameworks/Python.framework/Versions/2.4//lib/python2.4/logging/__init__.py", line 1089, in handle
self.callHandlers(record)
File "/Library/Frameworks/Python.framework/Versions/2.4//lib/python2.4/logging/__init__.py", line 1126, in callHandlers
hdlr.handle(record)
File "/Library/Frameworks/Python.framework/Versions/2.4//lib/python2.4/logging/__init__.py", line 642, in handle
self.emit(record)
File "/Library/Frameworks/Python.framework/Versions/2.4//lib/python2.4/logging/__init__.py", line 744, in emit
self.handleError(record)
File "/Library/Frameworks/Python.framework/Versions/2.4//lib/python2.4/logging/__init__.py", line 693, in handleError
traceback.print_exception(ei[0], ei[1], ei[2], None, sys.stderr)
File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/traceback.py", line 125, in print_exception
print_tb(tb, limit, file)
File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/traceback.py", line 67, in print_tb
' File "%s", line %d, in %s' % (filename,lineno,name))
RuntimeError: maximum recursion depth exceeded
- Steps to reproduce:
- Create a UML model tagged for plone 2.5, generate code.
Added by
(anonymous)
on
Nov 21, 2007 09:34 PM
The bug comes from the '-o ../', '-o ..' or '-o ../..' option.
Remove it and all work.
Added by
Encolpe Degoute
on
Nov 21, 2007 09:46 PM
If you use '../..' if fails before the infinite recursion.
Issue state:
unconfirmed
→
open
encolpe@gosseyn:~/zopes/agx-sprint/AGXProducts$ ~/virtualenvs/agx2.0/bin/archgenxml TestModel2.5.zargo -o ../..
INFO ArchGenXML Version 2.0-beta8 (dev/svn)
(c) 2003-2007 BlueDynamics, Austria, GNU General Public License 2.0 or later
INFO Parsing...
WARNING Not setting the product's name to '..', this was the old behaviour. Just name your class diagram according to your product name.
INFO Directory in which we're generating the files: '../..'.
INFO Generating...
INFO Starting new Product: 'TestContent'.
Traceback (most recent call last):
File "/home/encolpe/virtualenvs/agx2.0/bin/archgenxml", line 7, in ?
sys.exit(
File "/home/encolpe/virtualenvs/agx2.0/lib/python2.4/site-packages/archgenxml-2.0_beta8-py2.4.egg/archgenxml/ArchGenXML.py", line 107, in main
gen.parseAndGenerate()
File "/home/encolpe/virtualenvs/agx2.0/lib/python2.4/site-packages/archgenxml-2.0_beta8-py2.4.egg/archgenxml/ArchetypesGenerator.py", line 3775, in parseAndGenerate
self.generateProduct(root)
File "/home/encolpe/virtualenvs/agx2.0/lib/python2.4/site-packages/archgenxml-2.0_beta8-py2.4.egg/archgenxml/ArchetypesGenerator.py", line 3700, in generateProduct
self.generateStdFilesForProduct(package)
File "/home/encolpe/virtualenvs/agx2.0/lib/python2.4/site-packages/archgenxml-2.0_beta8-py2.4.egg/archgenxml/ArchetypesGenerator.py", line 2602, in generateStdFilesForProduct
self.generateGSsetuphandlers(package)
File "/home/encolpe/virtualenvs/agx2.0/lib/python2.4/site-packages/archgenxml-2.0_beta8-py2.4.egg/archgenxml/ArchetypesGenerator.py", line 3157, in generateGSsetuphandlers
templateparams=templateparams
File "/home/encolpe/virtualenvs/agx2.0/lib/python2.4/site-packages/archgenxml-2.0_beta8-py2.4.egg/archgenxml/CodeSectionHandler.py", line 68, in handleSectionedFile
outfile = open(outputpath, 'w')
IOError: [Errno 2] No such file or directory: '../../profiles/default/import_steps.xml'
Added by
Encolpe Degoute
on
Nov 22, 2007 09:20 AM
Philipp fix the bug in 8965 for '-o ..' path.
Issue state:
open
→
in-progress
But it doesn't work for '-o ../..' and '-o ../../..' for other reasons. The simplier way to fix those is to said that relative path are not supported.
No responses can be added.
If you can, please log in before submitting a reaction.
