Skip to content

Error from Sphinx smart_resolver with ccd_proc #2418

Closed

Description

@cdeil

As mentioned in astropy/ccdproc#45 (comment), trying to build the Sphinx docs for ccdproc generates an error in smart_resolver.py.

cc @mdboom

Activity

  1. cdeil commented on May 3, 2014

    @cdeil
    MemberAuthor

    I also get this error if I try to run python setup.py build_sphinx for Astropy master:
    https://gist.github.com/cdeil/6d4748c336676fc0bdeb#file-gistfile1-txt-L68

  2. added this to the v0.4.0 milestone on May 3, 2014
  3. mwcraig commented on May 7, 2014

    @mwcraig
    Member

    I believe this can be closed, fixed by #2430 (I can now build ccdproc docs with latest astropy-dev)

  4. cdeil commented on May 7, 2014

    @cdeil
    MemberAuthor

    For me for Astropy master (38e5ed8) build_sphinx now works, but for ccdproc mastr (b142c4c3cd36eae898611dd4c5689175a56e5a8e) I still see the error:

      File "/Users/deil/Library/Python/2.7/lib/python/site-packages/astropy-0.4.dev8380-py2.7-macosx-10.9-x86_64.egg/astropy/sphinx/ext/smart_resolver.py", line 51, in missing_reference_handler
        newnode['reftitle'] = reftarget
    TypeError: 'NoneType' object does not support item assignment
    

    Full log here: https://gist.github.com/cdeil/bf386b04299b6bc93301

    @mwcraig Maybe you don't see the issue because you are not using ccdproc master?

  5. mwcraig commented on May 7, 2014

    @mwcraig
    Member

    @cdeil -- good catch, you are correct. I'll try to chase down the reference that is causing the fail.

  6. cdeil commented on May 7, 2014

    @cdeil
    MemberAuthor

    Maybe you could also fix the smart_resolve.py to give a useful error message?
    Then finding the reference that is causing this error in ccdproc will be trivial.

  7. mwcraig commented on May 8, 2014

    @mwcraig
    Member

    @cdeil -- I took a look at smart_resolve.py and haven't a clue how to get back to the underlying line that generates the error: the docs is being built from the auto-generated doc in docs/api.

    On the bright side, @mdboom , I have a minimal example that demonstrates the error at https://github.com/mwcraig/ccdproc/tree/minimal . In short, the error comes up even if there is only one .py file for which docs are being generated and the contents of that file are

    from astropy.nddata import NDData
    
    class CCDData(NDData):
    
        """A class describing basic CCD data
    
        """
        def __init__(self, *args, **kwd):
            super(CCDData, self).__init__(*args, **kwd)
            if self.unit is None:
                raise ValueError("Unit for CCDData must be specified")

    It is the subclassing from NDData that leads to the error; subclassing from, e.g. object gives me no error.

    The output from python setup.py build_sphinx is at https://gist.github.com/mwcraig/df1265bee9b8a9e6ff87

  8. astrofrog commented on May 13, 2014

    @astrofrog
    Member

    For the record, I'm getting the same error with APLpy now.

    @mdboom - any ideas?

  9. eteq commented on May 27, 2014

    @eteq
    Member

    @mdboom @astrofrog @embray - is this now an astropy-helpers issue? If so, should an issue be made there, and this closed?

  10. astrofrog commented on May 27, 2014

    @astrofrog
    Member

    @eteq - yes, this issue should be moved to astropy-helpers. @cdeil, could you open it there?

  11. cdeil commented on Jun 2, 2014

    @cdeil
    MemberAuthor

    I think this issue is now being tracked as the astropy-helpers issue astropy/astropy-helpers#28 ?

  12. astrofrog commented on Jun 2, 2014

    @astrofrog
    Member

    @cdeil - is it the same issue? astropy/astropy-helpers#28 is specifically for classes that are decorated by InheritDocstring.

  13. 3 remaining items

  14. Cadair commented on Jun 3, 2014

    @Cadair
    Member

    Are you still porting fixes from astropy helpers into astropy.sphinx ?

  15. mdboom commented on Jun 3, 2014

    @mdboom
    Contributor

    We haven't been porting the fixes to astropy.sphinx. @embray: I think I've been seeing you say somewhere we shouldn't be doing that, but maybe I misunderstood...

  16. Cadair commented on Jun 3, 2014

    @Cadair
    Member

    is astropy_helpers going to be on pypi in a way that allows the use of these extensions and tools without having to go whole hog into the build system and running everything through setup.py?

  17. mdboom commented on Jun 3, 2014

    @mdboom
    Contributor

    Yes.

  18. Cadair commented on Jun 3, 2014

    @Cadair
    Member

    👍 to that.

  19. added 2 commits that reference this issue on Jun 3, 2014
    d8d122a
    ee494bc
  20. astrofrog commented on Jun 3, 2014

    @astrofrog
    Member

    @mdboom @Cadair - in this case I think it makes sense to backport since it's affecting affiliated packages that don't use astropy-helpers yet.

  21. added 2 commits that reference this issue on Jun 4, 2014
    22b025f
    fb73e67
  22. added 4 commits that reference this issue on Jan 27, 2018
    ce481f1
    104314a
    6158d0b
    4d9abc0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

🔥CriticalAffects-devPRs and issues that do not impact an existing Astropy release

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions