Skip to content

DM-53944: Improve handling of job environment settings. - #231

Draft
MichelleGower wants to merge 1 commit into
mainfrom
tickets/DM-53944
Draft

MichelleGower wants to merge 1 commit into
mainfrom
tickets/DM-53944

Conversation

@MichelleGower

Copy link
Copy Markdown
Collaborator

Checklist

  • ran Jenkins
  • added a release note for user-visible changes to doc/changes

@codecov

codecov Bot commented Feb 12, 2026 •

Copy link
Copy Markdown

❌ 7 Tests Failed:

Tests completed Failed Passed Skipped
360 7 353 0
View the top 3 failed test(s) by shortest run time
tests/test_transform.py::TestGatherJobEnvironment::testEnvironmentRootSite
Stack Traces | 0.004s run time
module = 'lsst.ctrl.bps', fromlist = ['htcondor', 'HTCondorService']
previousError = "No module named 'lsst.ctrl.bps.htcondor'"

    def tryImport(module: str, fromlist: list[str], previousError: str | None) -> types.ModuleType | type:
        pytype = importlib.import_module(module)
        # Can have functions inside classes inside modules
        for f in fromlist:
            try:
>               pytype = getattr(pytype, f)
                         ^^^^^^^^^^^^^^^^^^
E               AttributeError: module 'lsst.ctrl.bps' has no attribute 'htcondor'

.../hostedtoolcache/Python/3.13.15............/x64/lib/python3.13.../lsst/utils/doImport.py:52: AttributeError

The above exception was the direct cause of the following exception:

self = <test_transform.TestGatherJobEnvironment testMethod=testEnvironmentRootSite>

    def setUp(self):
        logging.basicConfig(level=logging.WARNING)
        logging.getLogger("lsst.ctrl.bps.bps_config").setLevel(logging.INFO)
        # The directories don't match real ones, but are here to test
        # environment variables in yaml environment section as well as
        # appending values across sections.
        filename = os.path.join(TESTDIR, "data/config_for_transform.yaml")
>       self.orig_config = BpsConfig(filename, BPS_SEARCH_ORDER, BPS_DEFAULTS)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/test_transform.py:256: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.../hostedtoolcache/Python/3.13.15............/x64/lib/python3.13.../ctrl/bps/bps_config.py:152: in __init__
    wms_service_class = doImport(wms_service_class_fqn)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.../hostedtoolcache/Python/3.13.15............/x64/lib/python3.13.../lsst/utils/doImport.py:69: in doImport
    pytype = tryImport(".".join(moduleComponents), infileComponents, previousError)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

module = 'lsst.ctrl.bps', fromlist = ['htcondor', 'HTCondorService']
previousError = "No module named 'lsst.ctrl.bps.htcondor'"

    def tryImport(module: str, fromlist: list[str], previousError: str | None) -> types.ModuleType | type:
        pytype = importlib.import_module(module)
        # Can have functions inside classes inside modules
        for f in fromlist:
            try:
                pytype = getattr(pytype, f)
            except AttributeError as e:
                extra = f"({previousError})" if previousError is not None else ""
>               raise ImportError(
                    f"Could not get attribute '{f}' from '{module}' when importing '{importable}' {extra}"
                ) from e
E               ImportError: Could not get attribute 'htcondor' from 'lsst.ctrl.bps' when importing 'lsst.ctrl.bps.htcondor.HTCondorService' (No module named 'lsst.ctrl.bps.htcondor')

.../hostedtoolcache/Python/3.13.15............/x64/lib/python3.13.../lsst/utils/doImport.py:55: ImportError
tests/test_transform.py::TestGatherJobEnvironment::testSearchObj
Stack Traces | 0.004s run time
module = 'lsst.ctrl.bps', fromlist = ['htcondor', 'HTCondorService']
previousError = "No module named 'lsst.ctrl.bps.htcondor'"

    def tryImport(module: str, fromlist: list[str], previousError: str | None) -> types.ModuleType | type:
        pytype = importlib.import_module(module)
        # Can have functions inside classes inside modules
        for f in fromlist:
            try:
>               pytype = getattr(pytype, f)
                         ^^^^^^^^^^^^^^^^^^
E               AttributeError: module 'lsst.ctrl.bps' has no attribute 'htcondor'

.../hostedtoolcache/Python/3.13.15............/x64/lib/python3.13.../lsst/utils/doImport.py:52: AttributeError

The above exception was the direct cause of the following exception:

self = <test_transform.TestGatherJobEnvironment testMethod=testSearchObj>

    def setUp(self):
        logging.basicConfig(level=logging.WARNING)
        logging.getLogger("lsst.ctrl.bps.bps_config").setLevel(logging.INFO)
        # The directories don't match real ones, but are here to test
        # environment variables in yaml environment section as well as
        # appending values across sections.
        filename = os.path.join(TESTDIR, "data/config_for_transform.yaml")
>       self.orig_config = BpsConfig(filename, BPS_SEARCH_ORDER, BPS_DEFAULTS)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/test_transform.py:256: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.../hostedtoolcache/Python/3.13.15............/x64/lib/python3.13.../ctrl/bps/bps_config.py:152: in __init__
    wms_service_class = doImport(wms_service_class_fqn)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.../hostedtoolcache/Python/3.13.15............/x64/lib/python3.13.../lsst/utils/doImport.py:69: in doImport
    pytype = tryImport(".".join(moduleComponents), infileComponents, previousError)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

module = 'lsst.ctrl.bps', fromlist = ['htcondor', 'HTCondorService']
previousError = "No module named 'lsst.ctrl.bps.htcondor'"

    def tryImport(module: str, fromlist: list[str], previousError: str | None) -> types.ModuleType | type:
        pytype = importlib.import_module(module)
        # Can have functions inside classes inside modules
        for f in fromlist:
            try:
                pytype = getattr(pytype, f)
            except AttributeError as e:
                extra = f"({previousError})" if previousError is not None else ""
>               raise ImportError(
                    f"Could not get attribute '{f}' from '{module}' when importing '{importable}' {extra}"
                ) from e
E               ImportError: Could not get attribute 'htcondor' from 'lsst.ctrl.bps' when importing 'lsst.ctrl.bps.htcondor.HTCondorService' (No module named 'lsst.ctrl.bps.htcondor')

.../hostedtoolcache/Python/3.13.15............/x64/lib/python3.13.../lsst/utils/doImport.py:55: ImportError
tests/test_transform.py::TestCreateGenericWorkflow::testCreatingQuantumGraph
Stack Traces | 0.005s run time
module = 'lsst.ctrl.bps', fromlist = ['htcondor', 'HTCondorService']
previousError = "No module named 'lsst.ctrl.bps.htcondor'"

    def tryImport(module: str, fromlist: list[str], previousError: str | None) -> types.ModuleType | type:
        pytype = importlib.import_module(module)
        # Can have functions inside classes inside modules
        for f in fromlist:
            try:
>               pytype = getattr(pytype, f)
                         ^^^^^^^^^^^^^^^^^^
E               AttributeError: module 'lsst.ctrl.bps' has no attribute 'htcondor'

.../hostedtoolcache/Python/3.13.15............/x64/lib/python3.13.../lsst/utils/doImport.py:52: AttributeError

The above exception was the direct cause of the following exception:

self = <test_transform.TestCreateGenericWorkflow testMethod=testCreatingQuantumGraph>

    def setUp(self):
        logging.basicConfig(level=logging.WARNING)
        logging.getLogger("lsst.ctrl.bps.bps_config").setLevel(logging.INFO)
        self.tmpdir = tempfile.mkdtemp(dir=TESTDIR)
        filename = os.path.join(TESTDIR, "data/config_for_transform.yaml")
>       self.orig_config = BpsConfig(filename, BPS_SEARCH_ORDER, BPS_DEFAULTS)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/test_transform.py:82: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.../hostedtoolcache/Python/3.13.15............/x64/lib/python3.13.../ctrl/bps/bps_config.py:152: in __init__
    wms_service_class = doImport(wms_service_class_fqn)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.../hostedtoolcache/Python/3.13.15............/x64/lib/python3.13.../lsst/utils/doImport.py:69: in doImport
    pytype = tryImport(".".join(moduleComponents), infileComponents, previousError)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

module = 'lsst.ctrl.bps', fromlist = ['htcondor', 'HTCondorService']
previousError = "No module named 'lsst.ctrl.bps.htcondor'"

    def tryImport(module: str, fromlist: list[str], previousError: str | None) -> types.ModuleType | type:
        pytype = importlib.import_module(module)
        # Can have functions inside classes inside modules
        for f in fromlist:
            try:
                pytype = getattr(pytype, f)
            except AttributeError as e:
                extra = f"({previousError})" if previousError is not None else ""
>               raise ImportError(
                    f"Could not get attribute '{f}' from '{module}' when importing '{importable}' {extra}"
                ) from e
E               ImportError: Could not get attribute 'htcondor' from 'lsst.ctrl.bps' when importing 'lsst.ctrl.bps.htcondor.HTCondorService' (No module named 'lsst.ctrl.bps.htcondor')

.../hostedtoolcache/Python/3.13.15............/x64/lib/python3.13.../lsst/utils/doImport.py:55: ImportError
tests/test_transform.py::TestGatherJobEnvironment::testEnvironmentNoSearchOpts
Stack Traces | 0.005s run time
module = 'lsst.ctrl.bps', fromlist = ['htcondor', 'HTCondorService']
previousError = "No module named 'lsst.ctrl.bps.htcondor'"

    def tryImport(module: str, fromlist: list[str], previousError: str | None) -> types.ModuleType | type:
        pytype = importlib.import_module(module)
        # Can have functions inside classes inside modules
        for f in fromlist:
            try:
>               pytype = getattr(pytype, f)
                         ^^^^^^^^^^^^^^^^^^
E               AttributeError: module 'lsst.ctrl.bps' has no attribute 'htcondor'

.../hostedtoolcache/Python/3.13.15............/x64/lib/python3.13.../lsst/utils/doImport.py:52: AttributeError

The above exception was the direct cause of the following exception:

self = <test_transform.TestGatherJobEnvironment testMethod=testEnvironmentNoSearchOpts>

    def setUp(self):
        logging.basicConfig(level=logging.WARNING)
        logging.getLogger("lsst.ctrl.bps.bps_config").setLevel(logging.INFO)
        # The directories don't match real ones, but are here to test
        # environment variables in yaml environment section as well as
        # appending values across sections.
        filename = os.path.join(TESTDIR, "data/config_for_transform.yaml")
>       self.orig_config = BpsConfig(filename, BPS_SEARCH_ORDER, BPS_DEFAULTS)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/test_transform.py:256: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.../hostedtoolcache/Python/3.13.15............/x64/lib/python3.13.../ctrl/bps/bps_config.py:152: in __init__
    wms_service_class = doImport(wms_service_class_fqn)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.../hostedtoolcache/Python/3.13.15............/x64/lib/python3.13.../lsst/utils/doImport.py:69: in doImport
    pytype = tryImport(".".join(moduleComponents), infileComponents, previousError)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

module = 'lsst.ctrl.bps', fromlist = ['htcondor', 'HTCondorService']
previousError = "No module named 'lsst.ctrl.bps.htcondor'"

    def tryImport(module: str, fromlist: list[str], previousError: str | None) -> types.ModuleType | type:
        pytype = importlib.import_module(module)
        # Can have functions inside classes inside modules
        for f in fromlist:
            try:
                pytype = getattr(pytype, f)
            except AttributeError as e:
                extra = f"({previousError})" if previousError is not None else ""
>               raise ImportError(
                    f"Could not get attribute '{f}' from '{module}' when importing '{importable}' {extra}"
                ) from e
E               ImportError: Could not get attribute 'htcondor' from 'lsst.ctrl.bps' when importing 'lsst.ctrl.bps.htcondor.HTCondorService' (No module named 'lsst.ctrl.bps.htcondor')

.../hostedtoolcache/Python/3.13.15............/x64/lib/python3.13.../lsst/utils/doImport.py:55: ImportError
tests/test_transform.py::TestGatherJobEnvironment::testEnvironmentRoot
Stack Traces | 0.005s run time
module = 'lsst.ctrl.bps', fromlist = ['htcondor', 'HTCondorService']
previousError = "No module named 'lsst.ctrl.bps.htcondor'"

    def tryImport(module: str, fromlist: list[str], previousError: str | None) -> types.ModuleType | type:
        pytype = importlib.import_module(module)
        # Can have functions inside classes inside modules
        for f in fromlist:
            try:
>               pytype = getattr(pytype, f)
                         ^^^^^^^^^^^^^^^^^^
E               AttributeError: module 'lsst.ctrl.bps' has no attribute 'htcondor'

.../hostedtoolcache/Python/3.13.15............/x64/lib/python3.13.../lsst/utils/doImport.py:52: AttributeError

The above exception was the direct cause of the following exception:

self = <test_transform.TestGatherJobEnvironment testMethod=testEnvironmentRoot>

    def setUp(self):
        logging.basicConfig(level=logging.WARNING)
        logging.getLogger("lsst.ctrl.bps.bps_config").setLevel(logging.INFO)
        # The directories don't match real ones, but are here to test
        # environment variables in yaml environment section as well as
        # appending values across sections.
        filename = os.path.join(TESTDIR, "data/config_for_transform.yaml")
>       self.orig_config = BpsConfig(filename, BPS_SEARCH_ORDER, BPS_DEFAULTS)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/test_transform.py:256: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.../hostedtoolcache/Python/3.13.15............/x64/lib/python3.13.../ctrl/bps/bps_config.py:152: in __init__
    wms_service_class = doImport(wms_service_class_fqn)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.../hostedtoolcache/Python/3.13.15............/x64/lib/python3.13.../lsst/utils/doImport.py:69: in doImport
    pytype = tryImport(".".join(moduleComponents), infileComponents, previousError)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

module = 'lsst.ctrl.bps', fromlist = ['htcondor', 'HTCondorService']
previousError = "No module named 'lsst.ctrl.bps.htcondor'"

    def tryImport(module: str, fromlist: list[str], previousError: str | None) -> types.ModuleType | type:
        pytype = importlib.import_module(module)
        # Can have functions inside classes inside modules
        for f in fromlist:
            try:
                pytype = getattr(pytype, f)
            except AttributeError as e:
                extra = f"({previousError})" if previousError is not None else ""
>               raise ImportError(
                    f"Could not get attribute '{f}' from '{module}' when importing '{importable}' {extra}"
                ) from e
E               ImportError: Could not get attribute 'htcondor' from 'lsst.ctrl.bps' when importing 'lsst.ctrl.bps.htcondor.HTCondorService' (No module named 'lsst.ctrl.bps.htcondor')

.../hostedtoolcache/Python/3.13.15............/x64/lib/python3.13.../lsst/utils/doImport.py:55: ImportError
tests/test_transform.py::TestGatherJobEnvironment::testEnvironmentRootSiteCluster
Stack Traces | 0.005s run time
module = 'lsst.ctrl.bps', fromlist = ['htcondor', 'HTCondorService']
previousError = "No module named 'lsst.ctrl.bps.htcondor'"

    def tryImport(module: str, fromlist: list[str], previousError: str | None) -> types.ModuleType | type:
        pytype = importlib.import_module(module)
        # Can have functions inside classes inside modules
        for f in fromlist:
            try:
>               pytype = getattr(pytype, f)
                         ^^^^^^^^^^^^^^^^^^
E               AttributeError: module 'lsst.ctrl.bps' has no attribute 'htcondor'

.../hostedtoolcache/Python/3.13.15............/x64/lib/python3.13.../lsst/utils/doImport.py:52: AttributeError

The above exception was the direct cause of the following exception:

self = <test_transform.TestGatherJobEnvironment testMethod=testEnvironmentRootSiteCluster>

    def setUp(self):
        logging.basicConfig(level=logging.WARNING)
        logging.getLogger("lsst.ctrl.bps.bps_config").setLevel(logging.INFO)
        # The directories don't match real ones, but are here to test
        # environment variables in yaml environment section as well as
        # appending values across sections.
        filename = os.path.join(TESTDIR, "data/config_for_transform.yaml")
>       self.orig_config = BpsConfig(filename, BPS_SEARCH_ORDER, BPS_DEFAULTS)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/test_transform.py:256: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.../hostedtoolcache/Python/3.13.15............/x64/lib/python3.13.../ctrl/bps/bps_config.py:152: in __init__
    wms_service_class = doImport(wms_service_class_fqn)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.../hostedtoolcache/Python/3.13.15............/x64/lib/python3.13.../lsst/utils/doImport.py:69: in doImport
    pytype = tryImport(".".join(moduleComponents), infileComponents, previousError)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

module = 'lsst.ctrl.bps', fromlist = ['htcondor', 'HTCondorService']
previousError = "No module named 'lsst.ctrl.bps.htcondor'"

    def tryImport(module: str, fromlist: list[str], previousError: str | None) -> types.ModuleType | type:
        pytype = importlib.import_module(module)
        # Can have functions inside classes inside modules
        for f in fromlist:
            try:
                pytype = getattr(pytype, f)
            except AttributeError as e:
                extra = f"({previousError})" if previousError is not None else ""
>               raise ImportError(
                    f"Could not get attribute '{f}' from '{module}' when importing '{importable}' {extra}"
                ) from e
E               ImportError: Could not get attribute 'htcondor' from 'lsst.ctrl.bps' when importing 'lsst.ctrl.bps.htcondor.HTCondorService' (No module named 'lsst.ctrl.bps.htcondor')

.../hostedtoolcache/Python/3.13.15............/x64/lib/python3.13.../lsst/utils/doImport.py:55: ImportError
tests/test_transform.py::TestGatherJobEnvironment::testVarsInEnvironment
Stack Traces | 0.005s run time
module = 'lsst.ctrl.bps', fromlist = ['htcondor', 'HTCondorService']
previousError = "No module named 'lsst.ctrl.bps.htcondor'"

    def tryImport(module: str, fromlist: list[str], previousError: str | None) -> types.ModuleType | type:
        pytype = importlib.import_module(module)
        # Can have functions inside classes inside modules
        for f in fromlist:
            try:
>               pytype = getattr(pytype, f)
                         ^^^^^^^^^^^^^^^^^^
E               AttributeError: module 'lsst.ctrl.bps' has no attribute 'htcondor'

.../hostedtoolcache/Python/3.13.15............/x64/lib/python3.13.../lsst/utils/doImport.py:52: AttributeError

The above exception was the direct cause of the following exception:

self = <test_transform.TestGatherJobEnvironment testMethod=testVarsInEnvironment>

    def setUp(self):
        logging.basicConfig(level=logging.WARNING)
        logging.getLogger("lsst.ctrl.bps.bps_config").setLevel(logging.INFO)
        # The directories don't match real ones, but are here to test
        # environment variables in yaml environment section as well as
        # appending values across sections.
        filename = os.path.join(TESTDIR, "data/config_for_transform.yaml")
>       self.orig_config = BpsConfig(filename, BPS_SEARCH_ORDER, BPS_DEFAULTS)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/test_transform.py:256: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.../hostedtoolcache/Python/3.13.15............/x64/lib/python3.13.../ctrl/bps/bps_config.py:152: in __init__
    wms_service_class = doImport(wms_service_class_fqn)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.../hostedtoolcache/Python/3.13.15............/x64/lib/python3.13.../lsst/utils/doImport.py:69: in doImport
    pytype = tryImport(".".join(moduleComponents), infileComponents, previousError)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

module = 'lsst.ctrl.bps', fromlist = ['htcondor', 'HTCondorService']
previousError = "No module named 'lsst.ctrl.bps.htcondor'"

    def tryImport(module: str, fromlist: list[str], previousError: str | None) -> types.ModuleType | type:
        pytype = importlib.import_module(module)
        # Can have functions inside classes inside modules
        for f in fromlist:
            try:
                pytype = getattr(pytype, f)
            except AttributeError as e:
                extra = f"({previousError})" if previousError is not None else ""
>               raise ImportError(
                    f"Could not get attribute '{f}' from '{module}' when importing '{importable}' {extra}"
                ) from e
E               ImportError: Could not get attribute 'htcondor' from 'lsst.ctrl.bps' when importing 'lsst.ctrl.bps.htcondor.HTCondorService' (No module named 'lsst.ctrl.bps.htcondor')

.../hostedtoolcache/Python/3.13.15............/x64/lib/python3.13.../lsst/utils/doImport.py:55: ImportError

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant