[Numpy-discussion] documentation generator based on pyparsing

Robert Cimrman cimrman3@ntc.zcu...
Fri Nov 30 02:48:09 CST 2007


Nils Wagner wrote:
> Thank you for your note. It works fine for me with 
> python2.5. However python2.3 results in
> 
> ./gendocs.py -m 'scipy.linsolve.umfpack'
> Traceback (most recent call last):
>    File "./gendocs.py", line 261, in ?
>      main()
>    File "./gendocs.py", line 207, in main
>      default = 1, help = help['page'] )
>    File "/usr/lib64/python2.3/optparse.py", line 820, in 
> add_option
>      option = self.option_class(*args, **kwargs)
>    File "/usr/lib64/python2.3/optparse.py", line 430, in 
> __init__
>      checker(self)
>    File "/usr/lib64/python2.3/optparse.py", line 499, in 
> _check_type
>      raise OptionError("invalid option type: %r" % 
> self.type, self)
> optparse.OptionError: option -p/--page: invalid option 
> type: <type 'int'>
> 
> How can I resolve this problem ?
> 

In gendocs.py, line 205, try to replace 'type = int' with 'type = "int"':

     parser.add_option( "-p", "--page", metavar = 'page', type = "int",
                        action = "store", dest = "page",
                        default = 1, help = help['page'] )

thanks for reporting bugs,
r.


More information about the Numpy-discussion mailing list