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

Using asAstropy() on a BaseCatalog will raise an exception unless lsst.daf.base has been imported

    Details

    • Type: Bug
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: afw
    • Labels:
      None
    • Templates:
    • Story Points:
      0.5
    • Team:
      Data Release Production

      Description

      If you try to use asAstropy() (for conversion or pretty printing) on a BaseCatalog then an exception will be raised unless lsst.daf.base has been specifically imported by the user. Thanks to Jim Bosch for noticing the key package.

      import lsst.afw.table as afwTable
       
      schema = afwTable.Schema()
      schema.addField('test', float)
       
      cat = afwTable.BaseCatalog(schema)
      rec = cat.addNew()
      rec['test'] = 0.0
       
      print(cat)
      

      raises "TypeError: Unable to convert function return value to a Python type!"

        Attachments

          Activity

            People

            • Assignee:
              jbosch Jim Bosch
              Reporter:
              erykoff Eli Rykoff
              Reviewers:
              John Swinbank
              Watchers:
              Eli Rykoff, Jim Bosch, John Swinbank, Kian-Tat Lim
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Summary Panel