Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-11861

SqlRegistry raising exception due to missing super.__del__

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: daf_persistence
    • Labels:
      None

      Description

      This commit is causing Exception ignored messages on anything that uses an SqlRegistry. I'm quite surprised that this isn't triggering an actual error, but it's making it look like my obs_ and jointcal package work is failing (due to the tracebacks, as pasted below). It looks like this isn't causing actual errors anywhere because we're not explicitly calling del sqlRegistry, but rather the interpreter is calling it during cleanup and not being able to propagate the error back up to anything, thus Exception Ignored.

      The simplest fix would be to remove the call to super in SqlRegistry.__del__().

      Example traceback:

      ...........x................................................................x.......Exception ignored in: <bound method SqlRegistry.__del__ of <lsst.daf.persistence.registries.SqliteRegistry object at 0x7fbb341e1f28>>
      Traceback (most recent call last):
        File "/home/parejkoj/lsst/lsstsw/stack/Linux64/daf_persistence/13.0-34-g674f0d6/python/lsst/daf/persistence/registries.py", line 320, in __del__
          super(SqlRegistry, self).__del__()
      AttributeError: 'super' object has no attribute '__del__'
      Exception ignored in: <bound method SqlRegistry.__del__ of <lsst.daf.persistence.registries.SqliteRegistry object at 0x7f6220253c88>>
      Traceback (most recent call last):
        File "/home/parejkoj/lsst/lsstsw/stack/Linux64/daf_persistence/13.0-34-g674f0d6/python/lsst/daf/persistence/registries.py", line 320, in __del__
          super(SqlRegistry, self).__del__()
      AttributeError: 'super' object has no attribute '__del__'
      Exception ignored in: <bound method SqlRegistry.__del__ of <lsst.daf.persistence.registries.SqliteRegistry object at 0x7fbf908ffb38>>
      Traceback (most recent call last):
        File "/home/parejkoj/lsst/lsstsw/stack/Linux64/daf_persistence/13.0-34-g674f0d6/python/lsst/daf/persistence/registries.py", line 320, in __del__
          super(SqlRegistry, self).__del__()
      AttributeError: 'super' object has no attribute '__del__'
      Exception ignored in: <bound method SqlRegistry.__del__ of <lsst.daf.persistence.registries.SqliteRegistry object at 0x7fbf908ffbe0>>
      Traceback (most recent call last):
        File "/home/parejkoj/lsst/lsstsw/stack/Linux64/daf_persistence/13.0-34-g674f0d6/python/lsst/daf/persistence/registries.py", line 320, in __del__
          super(SqlRegistry, self).__del__()
      AttributeError: 'super' object has no attribute '__del__'
      

        Attachments

          Issue Links

            Activity

            Hide
            tjenness Tim Jenness added a comment -

            Isn't this the wrong form of super()?

            I may be missing something but in Python 3 you do:

            super().__del__()
            

            so you probably want:

            from builtins import super
            

            to allow you to do that.

            Although I see we are using the py2 form in many places.

            Show
            tjenness Tim Jenness added a comment - Isn't this the wrong form of super() ? I may be missing something but in Python 3 you do: super ().__del__() so you probably want: from builtins import super to allow you to do that. Although I see we are using the py2 form in many places.
            Hide
            tjenness Tim Jenness added a comment -

            The reason these aren't noticed for testing is that the python garbage collector can not fail because a single delete method fails to run. It tells you about the problem but that is all it can do.

            Show
            tjenness Tim Jenness added a comment - The reason these aren't noticed for testing is that the python garbage collector can not fail because a single delete method fails to run. It tells you about the problem but that is all it can do.
            Hide
            npease Nate Pease [X] (Inactive) added a comment -

            Tim, does this look ok to you now?

            Show
            npease Nate Pease [X] (Inactive) added a comment - Tim, does this look ok to you now?
            Hide
            tjenness Tim Jenness added a comment -

            looks good.

            Show
            tjenness Tim Jenness added a comment - looks good.

              People

              Assignee:
              npease Nate Pease [X] (Inactive)
              Reporter:
              Parejkoj John Parejko
              Reviewers:
              Tim Jenness
              Watchers:
              John Parejko, Joshua Hoblitt, Nate Pease [X] (Inactive), Tim Jenness
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Jenkins

                  No builds found.