[Biopython-dev] sphinx build with github source has error in Restriction.py

hari jayaram harijay at gmail.com
Fri Oct 18 23:43:34 UTC 2013

Hi ,
This is my first post here..so hope I am following the

I am trying to create a Dash.app docset for biopython.  Dash.app is a very
fast documentation browser , sadly for OSX alone.

One way to getting a docset built is to point it at  sphinx documentation.
I am using  the sphinx-apidoc to auto-generate the documentation ( ver

Sphinx can generate the documentation just fine for most of the source
tree. It has an issue with Restriction.py where it does not like cls.size.
The  error is:

line 324, in __len__
    return cls.size
AttributeError: type object 'RestrictionType' has no attribute 'size'

I could cheat..and change it to "return 1" in the code and I got the
documentation to build just fine.
I dont know why sphinx cares about that line to throw an error , or how to
get around that without cheating.


On a side note: The sphinx documentation , looks fine in a browser , but
the dash2doc app could not index it to yield a docset. The problem was
somehwere in the html , beautiful soup entered an infinite loop.

I could however use pydoctor to generate a docset. It seems to work OK..but
while sphinx doc created 15,804 index entries. The pydoctor index had only
around 5000 entries.

Ref: http://kapeli.com/docsets

More information about the Biopython-dev mailing list