Exception during documentation with nested structure

Bug #1506485 reported by Simone Abbati
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
WSME
New
Undecided
Unassigned

Bug Description

Consider the example:

----------
class ExampleRoot(WSRoot):
    @expose(unicode, unicode) # First parameter is the return type,
                               # then the function argument types
    def hello(self, who=u'World'):
        return u"Hello {0} !".format(who)

class MyService(WSRoot):
    u"""WebServices Root"""

    #: Example "folder"
    example = ExampleRoot()
--------------

This fails trying to generate the documentation.
---------------------
Running Sphinx v1.3.1
     [exec] loading translations [it]... done
     [exec] loading pickled environment... not yet created
     [exec] loading intersphinx inventory from http://docs.python.org/objects.inv...
     [exec] building [mo]: targets for 0 po files that are out of date
     [exec] building [html]: targets for 3 source files that are out of date
     [exec] updating environment: 3 added, 0 changed, 0 removed
     [exec] reading sources... [ 33%] index
     [exec] reading sources... [ 66%] services
     [exec] Exception occurred:
     [exec] File "/opt/myproject/programs/core/python/lib/python2.7/site-packages/wsmeext/sphinxext.py", line 126, in scan_services
     [exec] raise ValueError("Path is too long: " + str(path))
     [exec] ValueError: Path is too long: ['addprotocol', 'im_func', 'func_code', 'co_argcount', 'denominator', 'denominator', 'denominator', 'denominator', 'de
nominator', 'denominator', 'denominator', 'denominator', 'denominator', 'denominator', 'denominator', 'denominator', 'denominator', 'denominator', 'denominator'
, 'denominator', 'denominator']
     [exec] The full traceback has been saved in /tmp/sphinx-err-B6_kSF.log, if you want to report the issue to the developers.
     [exec] Please also report this if it was a user error, so that a better error message can be provided next time.
     [exec] A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!
------------------

Full error log is in attachment.

This one works instead:
-------------
class MyService(WSRoot):
    @expose(unicode, unicode) # First parameter is the return type,
                               # then the function argument types
    def hello(self, who=u'World'):
        return u"Hello {0} !".format(who)
-----------

I fixed this but I am not sure about the impact of my patch, it just works good for me. It's not an elegant solution and I did not understand completely the problem tough...

Patch and full log in attachment.

Revision history for this message
Simone Abbati (simone-abbati) wrote :
Revision history for this message
Simone Abbati (simone-abbati) wrote :

Added patch attachment.
Notice line numbers inside the patch likely do not match (I also have other personal patch applied).

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.