apache/beam · warning

Dicom Client moved to…

Error message

Dicom Client moved to apache_beam.io.gcp.healthcare.dicomclient

What it means

Importing apache_beam.io.gcp.dicomclient warns that the DICOM client was relocated to apache_beam.io.gcp.healthcare.dicomclient. The old module only re-imports the new location (dicomclient and dicomio) and emits a DeprecationWarning.

Solutions

  1. Change imports to `from apache_beam.io.gcp.healthcare.dicomclient import ...`.
  2. Update IO references to `from apache_beam.io.gcp.healthcare import dicomio`.
  3. Search for 'io.gcp.dicomclient' and remove all legacy imports.

Example fix

// before
from apache_beam.io.gcp.dicomclient import DicomClient
// after
from apache_beam.io.gcp.healthcare.dicomclient import DicomClient
Defensive patterns

Strategy: validation

Validate before calling

import warnings
with warnings.catch_warnings(record=True) as w:
    warnings.simplefilter('always')
    import apache_beam.io.gcp.dicomclient  # noqa
    if w:
        raise ImportError('Import from apache_beam.io.gcp.healthcare.dicomclient')

Prevention

When it happens

Trigger: Any execution of `from apache_beam.io.gcp.dicomclient import ...` or plain import of that module.

Common situations: Healthcare DICOM pipelines written before the package reorganization; upgrades surfacing stale imports under io.gcp.

Understand the failure class

Background: "is deprecated and will be removed" — deprecation warnings for old API names, keywords, and options, and how to migrate before the removal release — this error's family across 29 libraries.

Related errors


AI-assisted analysis of apache/beam@12126d8942 (2026-09-13). Data as JSON: /api/errors/522fd2f6baf0e508. Report an issue: GitHub.

Appendix: source

Thrown at sdks/python/apache_beam/io/gcp/dicomclient.py:28

#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

# For backwards compatibility.

# pytype: skip-file

import warnings

# pylint: disable=unused-import
from apache_beam.io.gcp.healthcare import dicomclient
from apache_beam.io.gcp.healthcare import dicomio

warnings.warn(
    "Dicom Client moved to apache_beam.io.gcp.healthcare.dicomclient",
    DeprecationWarning)

View on GitHub (pinned to 12126d8942)