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

ValueError in lsst.afw.table.Catalog.extend()

    XMLWordPrintable

    Details

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

      Description

      from lsst.afw.table import BaseCatalog, Schema
       
      s = Schema()
      c1 = BaseCatalog(s)
      c2 = BaseCatalog(s)
       
      c1.extend(c2)

      The above fails, saying:

      Traceback (most recent call last):
        File "test.py", line 7, in <module>
          c1.extend(c2)
        File "/Users/jds/Projects/Astronomy/LSST/stack/DarwinX86/afw/10.0+3/python/lsst/afw/table/tableLib.py", line 6909, in extend
          _tableLib.BaseCatalog_extend(self, iterable, deep)
      ValueError: invalid null reference in method 'BaseCatalog_extend', argument 3 of type 'lsst::afw::table::SchemaMapper const &'

        Attachments

          Issue Links

            Activity

            Hide
            swinbank John Swinbank added a comment -

            Ready for review on tickets/DM-1710.

            I created a new testBaseCatalog.py file for the test. This seems like a lot of boilerplate for a tiny test case and even more tiny bugfix, but there was nowhere else obvious to add a test and I'm naively hoping we might add more tests to this file in future. If you'd prefer that I just slip this test in somewhere else, though, that's fine with me.

            Show
            swinbank John Swinbank added a comment - Ready for review on tickets/ DM-1710 . I created a new testBaseCatalog.py file for the test. This seems like a lot of boilerplate for a tiny test case and even more tiny bugfix, but there was nowhere else obvious to add a test and I'm naively hoping we might add more tests to this file in future. If you'd prefer that I just slip this test in somewhere else, though, that's fine with me.
            Hide
            jbosch Jim Bosch added a comment -

            I think this is a duplicate of DM-1514 (also in review), or at least a close relative. I'm going to try moving your test code over to that branch, to ensure it passes your test case, and if doesn't I'll move your fix as well. I'll probably put the test in testSimpleTable.py.

            Show
            jbosch Jim Bosch added a comment - I think this is a duplicate of DM-1514 (also in review), or at least a close relative. I'm going to try moving your test code over to that branch, to ensure it passes your test case, and if doesn't I'll move your fix as well. I'll probably put the test in testSimpleTable.py.
            Hide
            jbosch Jim Bosch added a comment -

            Actually, it looks like while the two issues are closely related, neither change fixes the other's bug. Might as well just merge them to master separately, since we already have separate branches.

            I would recommend moving the test to testSimpleTable.py, however, as we've already got a lot of other similar tests there (essentially all the tests for BaseTable - perhaps the test should be renamed).

            Show
            jbosch Jim Bosch added a comment - Actually, it looks like while the two issues are closely related, neither change fixes the other's bug. Might as well just merge them to master separately, since we already have separate branches. I would recommend moving the test to testSimpleTable.py, however, as we've already got a lot of other similar tests there (essentially all the tests for BaseTable - perhaps the test should be renamed).

              People

              Assignee:
              swinbank John Swinbank
              Reporter:
              swinbank John Swinbank
              Reviewers:
              Jim Bosch
              Watchers:
              Dominique Boutigny, Jim Bosch, John Swinbank
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Jenkins

                  No builds found.