Problem running HappyDoc3, using Python 2.4.1

petsod
2006-03-01
2013-04-17
  • petsod
    petsod
    2006-03-01

    Hi,

    After unpacking the HappyDoc tar, I try to run it by the command: ./HappyDoc <file.py> and get the error printout:

    "
    --- Plugin Module Error in happydoclib.docstring.docstring_PlainText ---
    Traceback (most recent call last):

      File "/HappyDoc3-r3_0_a1/happydoclib/pluginloader.py", line 177, in __init__
        _module = __import__( _import_name )

      File "/HappyDoc3-r3_0_a1/happydoclib/docstring/docstring_PlainText.py", line 66, in ?
        import happydoclib.docstring.StructuredText

      File "/HappyDoc3-r3_0_a1/happydoclib/docstring/StructuredText/__init__.py", line 14, in ?
        import HTMLClass, DocumentClass

      File "/HappyDoc3-r3_0_a1/happydoclib/docstring/StructuredText/HTMLClass.py", line 15, in ?
        import re, sys, ST

      File "/HappyDoc3-r3_0_a1/happydoclib/docstring/StructuredText/ST.py", line 14, in ?
        import re, STDOM
    SyntaxError: Invalid syntax.  Assignment to None. (STDOM.py, line 343)
    ---------------------------

    --- Plugin Module Error in happydoclib.docstring.docstring_StructuredText ---
    Traceback (most recent call last):

      File "/HappyDoc3-r3_0_a1/happydoclib/pluginloader.py", line 177, in __init__
        _module = __import__( _import_name )

      File "/HappyDoc3-r3_0_a1/happydoclib/docstring/docstring_StructuredText.py", line 62, in ?
        import happydoclib.docstring.StructuredText

      File "/HappyDoc3-r3_0_a1/happydoclib/docstring/StructuredText/__init__.py", line 14, in ?
        import HTMLClass, DocumentClass

      File "/HappyDoc3-r3_0_a1/happydoclib/docstring/StructuredText/HTMLClass.py", line 15, in ?
        import re, sys, ST

      File "/HappyDoc3-r3_0_a1/happydoclib/docstring/StructuredText/ST.py", line 14, in ?
        import re, STDOM
    SyntaxError: Invalid syntax.  Assignment to None. (STDOM.py, line 343)
    ---------------------------

    --- Plugin Module Error in happydoclib.docset.docset_TAL ---
    Traceback (most recent call last):

      File "/HappyDoc3-r3_0_a1/happydoclib/pluginloader.py", line 177, in __init__
        _module = __import__( _import_name )

      File "/HappyDoc3-r3_0_a1/happydoclib/docset/docset_TAL/__init__.py", line 66, in ?
        from happydoclib.docset.docset_TAL.templateset import TemplateSet

      File "/HappyDoc3-r3_0_a1/happydoclib/docset/docset_TAL/templateset.py", line 66, in ?
        from happydoclib.docset.docset_TAL.templatefile import TemplateFile

      File "/HappyDoc3-r3_0_a1/happydoclib/docset/docset_TAL/templatefile.py", line 64, in ?
        from happydoclib.docset.docset_TAL import hdExpressions

      File "/HappyDoc3-r3_0_a1/happydoclib/docset/docset_TAL/hdExpressions.py", line 27, in ?
        from hdTALES import Engine, CompilerError, _valid_name, NAME_RE, \ SyntaxError: Invalid syntax.  Assignment to None. (hdTALES.py, line 282)
    ---------------------------

    HappyDoc version 3.0.a1
    Scanning...
    Parsing: PdrTest.py
    Done
    Initializing documentation set HappyDoc Generated Documentation
    NEED TO HANDLE extraParameters in DocSetBase
    Writing...
    Documenting: "PdrTest.py"
             to: "doc/PdrTest.html"
    Wanted: "StructuredText"
    Have  : ['RawText', 'ClassicStructuredText']
    Traceback (most recent call last):
      File "./happydoc", line 61, in ?
        HappyDoc().run()

      File "/HappyDoc3-r3_0_a1/happydoclib/CommandLineApp.py", line 314, in run
        exit_code = apply(self.main, tuple(self.remainingOpts))

      File "/HappyDoc3-r3_0_a1/happydoclib/appclass.py", line 492, in main
        docset.write()

      File "/HappyDoc3-r3_0_a1/happydoclib/docset/base.py", line 322, in write
        self.scanner.walk(self.writeCB)

      File "/HappyDoc3-r3_0_a1/happydoclib/scanner.py", line 227, in walk
        tree.walk(callback)

      File "/HappyDoc3-r3_0_a1/happydoclib/packagetree.py", line 443, in walk
        callback(self)

      File "/HappyDoc3-r3_0_a1/happydoclib/docset/base.py", line 315, in writeCB
        writer(packageTreeNode)

      File "/HappyDoc3-r3_0_a1/happydoclib/docset/docset_MultiHTMLFile.py", line 1078, in processPythonFile
        self.writePythonFileInfoToOutput(output, packageTreeNode)

      File "/HappyDoc3-r3_0_a1/happydoclib/docset/docset_MultiHTMLFile.py", line 1025, in writePythonFileInfoToOutput
        self.writeFunctionsToOutput(output, packageTreeNode)

      File "/HappyDoc3-r3_0_a1/happydoclib/docset/docset_MultiHTMLFile.py", line 861, in writeFunctionsToOutput
        packageTreeNode.module_info.getFunctionInfo(function_name),

      File "/HappyDoc3-r3_0_a1/happydoclib/docset/docset_MultiHTMLFile.py", line 828, in writeOneFunctionToOutput
        self.writeText(output, docstring_text, docstring_format)

      File "/HappyDoc3-r3_0_a1/happydoclib/docset/base.py", line 615, in writeText
        html = self.formatText(text, textFormat)

      File "/HappyDoc3-r3_0_a1/happydoclib/docset/base.py", line 582, in formatText
        converter_factory = getConverterFactory(textFormat)
      File "/HappyDoc3-r3_0_a1/happydoclib/docstring/__init__.py", line 183, in getConverterFactory
        raise ValueError('Unrecognized docstring format type "%s"' % formatType)
    ValueError: Unrecognized docstring format type "StructuredText"
    "

    Any ideas anyone? I'm really new to Python and HappyDoc so I'd appreciate some pointers here!

    Thanks!

     
    • Doug Hellmann
      Doug Hellmann
      2006-03-01

      Hmm, I haven't seen that one before.

      What version of Python are you using, and what is your platform?  It's been a while since I've updated HappyDoc to work with current python, so this could be related to a language change.

       
    • Doug Hellmann
      Doug Hellmann
      2006-03-01

      Sorry, I see the version in the header now, so I just need the platform.  It looks unixish?

       
    • petsod
      petsod
      2006-03-01

      Hi,

      Yes you're right, UNIX it is.

       
    • ruchirt
      ruchirt
      2006-04-01

      Does this mean that HappyDoc does not work in windows?

      I tried running it on windows but I get the following message

      c:/dev>happydoc.py src/dir1/dir2
      --- Plugin Module Error in happydoclib.docstring.docstring_PlainText ---
      Traceback (most recent call last):
        File "C:\tools\HappyDoc3-r3_0_a1\happydoclib\pluginloader.py", line 177, in __init__
          _module = __import__( _import_name )
        File "C:\tools\HappyDoc3-r3_0_a1\happydoclib\docstring\docstring_PlainText.py", line 66, in ?
          import happydoclib.docstring.StructuredText
        File "C:\tools\HappyDoc3-r3_0_a1\happydoclib\docstring\StructuredText\__init__.py", line 14, in ?
          import HTMLClass, DocumentClass
        File "C:\tools\HappyDoc3-r3_0_a1\happydoclib\docstring\StructuredText\HTMLClass.py", line 15, in ?
          import re, sys, ST
        File "C:\tools\HappyDoc3-r3_0_a1\happydoclib\docstring\StructuredText\ST.py", line 14, in ?
          import re, STDOM
      SyntaxError: Invalid syntax.  Assignment to None. (STDOM.py, line 343)
      ---------------------------

      --- Plugin Module Error in happydoclib.docstring.docstring_StructuredText ---
      Traceback (most recent call last):
        File "C:\tools\HappyDoc3-r3_0_a1\happydoclib\pluginloader.py", line 177, in __init__
          _module = __import__( _import_name )
        File "C:\tools\HappyDoc3-r3_0_a1\happydoclib\docstring\docstring_StructuredText.py", line 62, in ?
          import happydoclib.docstring.StructuredText
        File "C:\tools\HappyDoc3-r3_0_a1\happydoclib\docstring\StructuredText\__init__.py", line 14, in ?
          import HTMLClass, DocumentClass
        File "C:\tools\HappyDoc3-r3_0_a1\happydoclib\docstring\StructuredText\HTMLClass.py", line 15, in ?
          import re, sys, ST
        File "C:\tools\HappyDoc3-r3_0_a1\happydoclib\docstring\StructuredText\ST.py", line 14, in ?
          import re, STDOM
      SyntaxError: Invalid syntax.  Assignment to None. (STDOM.py, line 343)
      ---------------------------

      --- Plugin Module Error in happydoclib.docset.docset_TAL ---
      Traceback (most recent call last):
        File "C:\tools\HappyDoc3-r3_0_a1\happydoclib\pluginloader.py", line 177, in __init__
          _module = __import__( _import_name )
        File "C:\tools\HappyDoc3-r3_0_a1\happydoclib\docset\docset_TAL\__init__.py", line 66, in ?
          from happydoclib.docset.docset_TAL.templateset import TemplateSet
        File "C:\tools\HappyDoc3-r3_0_a1\happydoclib\docset\docset_TAL\templateset.py", line 66, in ?
          from happydoclib.docset.docset_TAL.templatefile import TemplateFile
        File "C:\tools\HappyDoc3-r3_0_a1\happydoclib\docset\docset_TAL\templatefile.py", line 64, in ?
          from happydoclib.docset.docset_TAL import hdExpressions
        File "C:\tools\HappyDoc3-r3_0_a1\happydoclib\docset\docset_TAL\hdExpressions.py", line 27, in ?
          from hdTALES import Engine, CompilerError, _valid_name, NAME_RE, \ SyntaxError: Invalid syntax.  Assignment to None. (hdTALES.py, line 282)
      ---------------------------

      HappyDoc version 3.0.a1
      Scanning...
      Traceback (most recent call last):
        File "C:\tools\HappyDoc3-r3_0_a1\happydoc.py", line 61, in ?
          HappyDoc().run()
        File "C:\tools\HappyDoc3-r3_0_a1\happydoclib\CommandLineApp.py", line 314, in run
          exit_code = apply(self.main, tuple(self.remainingOpts))
        File "C:\tools\HappyDoc3-r3_0_a1\happydoclib\appclass.py", line 471, in main
          includeComments=self.include_comments,
        File "C:\tools\HappyDoc3-r3_0_a1\happydoclib\scanner.py", line 119, in __init__
          tree = self.buildPackageTree(dir_name)
        File "C:\tools\HappyDoc3-r3_0_a1\happydoclib\scanner.py", line 196, in buildPackageTree
          home_cvsignore_filename = os.path.join(os.environ['HOME'], '.cvsignore')
        File "C:\tools\Python24\Lib\os.py", line 422, in __getitem__
          return self.data[key.upper()]
      KeyError: 'HOME'

       
    • ruchirt
      ruchirt
      2006-04-01

      Hi again,
      I forgot to mention that im trying to use happydoc for jython because I think this is the only tool that will work for jython source files.

      Im new to this tool and I want to run it on windows.
      Any help will be appreciated

      Thanks