Debian Bug report logs - #219114
/usr/bin/happydoc: parsing failure with -*- coding: utf-8 -*-

version graph

Package: python-happydoc; Maintainer for python-happydoc is (unknown);

Reported by: Frédéric Gobry <frederic.gobry@smartdata.ch>

Date: Tue, 4 Nov 2003 12:33:02 UTC

Severity: normal

Tags: upstream

Found in version 2.1-1

Fixed in version python-happydoc/2.1-3

Done: Matthias Klose <doko@debian.org>

Bug is archived. No further changes may be made.

Forwarded to http://sourceforge.net/tracker/index.php?func=detail&aid=843110&group_id=9678&atid=109678

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Matthias Klose <doko@debian.org>:
Bug#219114; Package python-happydoc. Full text and rfc822 format available.

Acknowledgement sent to Frédéric Gobry <frederic.gobry@smartdata.ch>:
New Bug report received and forwarded. Copy sent to Matthias Klose <doko@debian.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Frédéric Gobry <frederic.gobry@smartdata.ch>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: /usr/bin/happydoc: parsing failure with -*- coding: utf-8 -*-
Date: Tue, 04 Nov 2003 13:22:54 +0100
Package: python-happydoc
Version: 2.1-1
Severity: normal
File: /usr/bin/happydoc

Happydoc crashes when parsing a file that starts with a coding
specification like:

# -*- coding: utf-8 -*-

The stack dump is then:

Traceback (most recent call last):
  File "/usr/bin/happydoc", line 61, in ?
    HappyDoc().run()
  File "/usr/lib/python2.3/site-packages/happydoclib/CommandLineApp.py", line 315, in run
    exit_code = apply(self.main, tuple(self.remainingOpts))
  File "/usr/lib/python2.3/site-packages/happydoclib/appclass.py", line 429, in main
    parsed_modules = apply( self.docset_factory, (), docset_init_params)
  File "/usr/lib/python2.3/site-packages/happydoclib/happydocset.py", line 268, in __init__
    self.processFiles(inputModuleNames)
  File "/usr/lib/python2.3/site-packages/happydoclib/happydocset.py", line 742, in processFiles
    file_info = self.getFileInfo(file_name)
  File "/usr/lib/python2.3/site-packages/happydoclib/happydocset.py", line 620, in getFileInfo
    self._default_parser_config_values,
  File "/usr/lib/python2.3/site-packages/happydoclib/parseinfo/__init__.py", line 186, in getDocs
    defaultConfigValues=defaultConfigValues)
  File "/usr/lib/python2.3/site-packages/happydoclib/parseinfo/moduleinfo.py", line 117, in __init__
    defaultConfigValues=defaultConfigValues)
  File "/usr/lib/python2.3/site-packages/happydoclib/parseinfo/suite.py", line 118, in __init__
    self._extractInfo(tree)
  File "/usr/lib/python2.3/site-packages/happydoclib/parseinfo/suite.py", line 152, in _extractInfo
    found, vars = match(DOCSTRING_STMT_PATTERN, tree[3])
IndexError: tuple index out of range

Cheers,
Frédéric

-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux rhin 2.4.22 #1 Wed Aug 27 11:35:06 CEST 2003 i686
Locale: LANG=en_US.ISO8859-1, LC_CTYPE=en_US.ISO8859-1

Versions of packages python-happydoc depends on:
ii  python                        2.3.2-2    An interactive high-level object-o

-- no debconf information




Noted your statement that Bug has been forwarded to http://sourceforge.net/tracker/index.php?func=detail&aid=843110&group_id=9678&atid=109678. Request was from Matthias Klose <doko@cs.tu-berlin.de> to control@bugs.debian.org. Full text and rfc822 format available.

Tags added: upstream Request was from Matthias Klose <doko@cs.tu-berlin.de> to control@bugs.debian.org. Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Matthias Klose <doko@debian.org>:
Bug#219114; Package python-happydoc. Full text and rfc822 format available.

Acknowledgement sent to Jerome Alet <alet@librelogiciel.com>:
Extra info received and forwarded to list. Copy sent to Matthias Klose <doko@debian.org>. Full text and rfc822 format available.

Message #14 received at 219114@bugs.debian.org (full text, mbox):

From: Jerome Alet <alet@librelogiciel.com>
To: Debian Bug Tracking System <219114@bugs.debian.org>
Subject: /usr/bin/happydoc: problem not limited to utf-8
Date: Tue, 27 Jul 2004 00:55:31 +0200
Package: python-happydoc
Version: 2.1-1
Followup-For: Bug #219114

I confirm the problem, but this is not limited to the utf-8
charset. Instead it's probably the comment format which makes
it break

Problem is in
/usr/lib/python2.3/site-packages/happydoclib/parseinfo/suite.py

--- CUT ---
        # extract docstring
        if len(tree) == 2:
            found, vars = match(DOCSTRING_STMT_PATTERN[1], tree[1])
        else:
            found, vars = match(DOCSTRING_STMT_PATTERN, tree[3])
--- CUT ---

but when such a special comment is present, len(tree) is equal
to 3, so the else part is executed, and fails because when
len(tree) is 3, tree[3] doesn't exist (indexes starts at 0
in Python)

Latest upstream version seems to be a major rewrite and
doesn't include the same file, not sure if problem is already
fixed or not

hth

Jerome Alet


-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.4.26-1-686
Locale: LANG=C, LC_CTYPE=C (ignored: LC_ALL set to fr_FR@euro)

Versions of packages python-happydoc depends on:
ii  python                        2.3.4-1    An interactive high-level object-o

-- no debconf information



Reply sent to Matthias Klose <doko@debian.org>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to Frédéric Gobry <frederic.gobry@smartdata.ch>:
Bug acknowledged by developer. Full text and rfc822 format available.

Message #19 received at 219114-close@bugs.debian.org (full text, mbox):

From: Matthias Klose <doko@debian.org>
To: 219114-close@bugs.debian.org
Subject: Bug#219114: fixed in python-happydoc 2.1-3
Date: Sat, 16 Oct 2004 11:32:07 -0400
Source: python-happydoc
Source-Version: 2.1-3

We believe that the bug you reported is fixed in the latest version of
python-happydoc, which is due to be installed in the Debian FTP archive:

python-happydoc-doc_2.1-3_all.deb
  to pool/main/p/python-happydoc/python-happydoc-doc_2.1-3_all.deb
python-happydoc_2.1-3.diff.gz
  to pool/main/p/python-happydoc/python-happydoc_2.1-3.diff.gz
python-happydoc_2.1-3.dsc
  to pool/main/p/python-happydoc/python-happydoc_2.1-3.dsc
python-happydoc_2.1-3_all.deb
  to pool/main/p/python-happydoc/python-happydoc_2.1-3_all.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 219114@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Matthias Klose <doko@debian.org> (supplier of updated python-happydoc package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Sat, 16 Oct 2004 17:27:35 +0200
Source: python-happydoc
Binary: python-happydoc python-happydoc-doc
Architecture: source all
Version: 2.1-3
Distribution: unstable
Urgency: low
Maintainer: Matthias Klose <doko@debian.org>
Changed-By: Matthias Klose <doko@debian.org>
Description: 
 python-happydoc - Python Documentation Extraction Tool
 python-happydoc-doc - Python Documentation Extraction Tool Documentation
Closes: 219114
Changes: 
 python-happydoc (2.1-3) unstable; urgency=low
 .
   * Ignore the encoding_decl introduced in recent python versions.
     Closes: #219114.
Files: 
 da791cd5082a0bccf991c2f1ada67fa1 671 python extra python-happydoc_2.1-3.dsc
 0609100a13d473bcec1f98c6a876b703 7974 python extra python-happydoc_2.1-3.diff.gz
 61c97990149a87f5a3566adf91978682 150742 python extra python-happydoc_2.1-3_all.deb
 7270c88a667db5f6e3e2aa7f15bc5c57 141692 doc extra python-happydoc-doc_2.1-3_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)

iD8DBQFBcT4kStlRaw+TLJwRAsy+AJ9mqYZI+kRk7Aj73y/D/Ibpj9V0twCfa0nj
oqXEaikfhf9u8PAOqiVdZ9k=
=9a0k
-----END PGP SIGNATURE-----




Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sun Apr 20 20:59:28 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.