CRITICAL Error while reparsing file 'Content/Auto.py'.

by Reinout van Rees last modified Dec 30, 2008 05:48 PM
You're generating your code again and suddenly archgenxml complains about errors in a file.

When you get an error looking like this it can have three reasons.

  • You edited the file and made a python error. Missing closing ] or so.
  • Archgenxml might be generating wrong code based on your tagged values; as it tries to read in the file it just generated it can check for errors like this.
  • A third reason might be that the file was originally generated on windows and you're running archgenxml on linux/mac now; the python parser tends to be bit picky on this when run by archgenxml. In this case the error can look like this:
     CRITICAL Error while reparsing file '/Content/Auto.py'.
     Traceback (most recent call last):
       File "ArchGenXML/ArchGenXML.py", line 80, in ?
         main()
       File "ArchGenXML/ArchGenXML.py", line 77, in main
         gen.parseAndGenerate()
       File "/home/mirella/flexrent/Products/ArchGenXML/ArchetypesGenerator.py", 
       line 3094, in parseAndGenerate
         self.generateProduct(root)
       File "/home/mirella/flexrent/Products/ArchGenXML/ArchetypesGenerator.py", 
        line 3014, in generateProduct
         self.generatePackage(root)
       File "/home/mirella/flexrent/Products/ArchGenXML/ArchetypesGenerator.py", 
        line 2737, in generatePackage
         self.generatePackage(p,recursive=1)
       File "/home/mirella/flexrent/Products/ArchGenXML/ArchetypesGenerator.py", 
        line 2672, in generatePackage
         mod=PyParser.PyModule(filename)
       File "/home/mirella/flexrent/Products/ArchGenXML/PyParser.py", 
        line 53, in __init__
         self.ast = parser.suite(self.filebuf)
       File "<string>", line 21
         __author__  = ''' <>, '''