Bug#730166: AttributeError: 'NoneType' object has no attribute 'group'

2013-11-22 Thread Mathieu Malaterre
Package: python-tifffile

For some reason tifffile does not work anymore:

$ tifffile
Traceback (most recent call last):
  File /usr/bin/tifffile, line 7, in module
sys.exit(tifffile.main())
  File /usr/lib/python2.6/dist-packages/tifffile.py, line 2976, in main
description=search_doc(\n\n([^|]*?)\n\n, ''),
  File /usr/lib/python2.6/dist-packages/tifffile.py, line 2973, in lambda
search_doc = lambda r, d: re.search(r, __doc__).group(1) if __doc__ else d
AttributeError: 'NoneType' object has no attribute 'group'

$ apt-cache policy python-tifffile
python-tifffile:
  Installed: 20130502-1
  Candidate: 20130502-1
  Version table:
 20130502-1 0
200 http://ftp.fr.debian.org/debian/ testing/main amd64 Packages
100 http://ftp.fr.debian.org/debian/ unstable/main amd64 Packages
 *** 20130502-1 0
100 /var/lib/dpkg/status


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#730166: AttributeError: 'NoneType' object has no attribute 'group'

2013-11-22 Thread Philipp Kern
tag 730166 + patch
thanks

On Fri, Nov 22, 2013 at 09:02:55AM +0100, Mathieu Malaterre wrote:
 For some reason tifffile does not work anymore:
 
 $ tifffile
 Traceback (most recent call last):
   File /usr/bin/tifffile, line 7, in module
 sys.exit(tifffile.main())
   File /usr/lib/python2.6/dist-packages/tifffile.py, line 2976, in main
 description=search_doc(\n\n([^|]*?)\n\n, ''),
   File /usr/lib/python2.6/dist-packages/tifffile.py, line 2973, in lambda
 search_doc = lambda r, d: re.search(r, __doc__).group(1) if __doc__ else d
 AttributeError: 'NoneType' object has no attribute 'group'

I think it'd make sense to just take the first line of the module
docstring as documentation:

--- tifffile.py.orig2013-11-22 18:53:39.107471300 +0100
+++ tifffile.py 2013-11-22 19:06:36.245232148 +0100
@@ -2973,7 +2973,7 @@
 search_doc = lambda r, d: re.search(r, __doc__).group(1) if __doc__ else d
 parser = optparse.OptionParser(
 usage=usage: %prog [options] path,
-description=search_doc(\n\n([^|]*?)\n\n, ''),
+description=search_doc(^([^\n]+), ),
 version=%%prog %s % search_doc(:Version: (.*), Unknown))
 opt = parser.add_option
 opt('-p', '--page', dest='page', type='int', default=-1,

Kind regards
Philipp Kern


signature.asc
Description: Digital signature


Bug#730166: AttributeError: 'NoneType' object has no attribute 'group'

2013-11-22 Thread Mathieu Malaterre
Dear Christoph,

  I am currently experiencing an issue using tifffile.py on a debian
system. Without any option I am getting the following error:

http://bugs.debian.org/730166#5

  A member of the debian community is proposing the following patch to
solve the issue:

http://bugs.debian.org/730166#12

  Would you please comment on the patch, and hopefully merge it upstream.

Thanks


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org