apache/beam · warning
Dicom IO moved to apache_beam.io.gcp.healthcare.dicomcio
Error message
Dicom IO moved to apache_beam.io.gcp.healthcare.dicomcio
What it means
Importing apache_beam.io.gcp.dicomio warns that the DICOM IO transforms moved to apache_beam.io.gcp.healthcare.dicomcio. The old module re-exports from the healthcare package and warns at import time.
Solutions
- Change imports to `from apache_beam.io.gcp.healthcare.dicomcio import ...`.
- Search for 'io.gcp.dicomio' and update every import site.
- Re-run tests under the upgraded Beam version.
Example fix
// before from apache_beam.io.gcp.dicomio import ReadFromDicom // after from apache_beam.io.gcp.healthcare.dicomcio import ReadFromDicom
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.dicomio # noqa
if w:
raise ImportError('Import from apache_beam.io.gcp.healthcare.dicomcio') Prevention
- Import DICOM IO transforms from apache_beam.io.gcp.healthcare.dicomcio.
- Run CI with deprecation warnings escalated to errors.
- Grep for 'io.gcp.dicomio' in pre-commit hooks.
When it happens
Trigger: Any execution of `from apache_beam.io.gcp.dicomio import ...` or importing the module directly.
Common situations: Older DICOM pipeline code importing from io.gcp before the healthcare reorganization; dependency upgrades surfacing stale imports.
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
- Dicom Client moved to…
- chunk_to_dict_fn is deprecated, use embeddable_to_dict_fn
- Kafka transforms moved to apache_beam.io.kafka
- Native sinks no longer implemented; falling back to…
- Native sinks no longer implemented; ignoring…
AI-assisted analysis of apache/beam@12126d8942 (2026-09-13).
Data as JSON: /api/errors/1f62dfb9fa94ed44.
Report an issue: GitHub.
Appendix: source
Thrown at sdks/python/apache_beam/io/gcp/dicomio.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 IO moved to apache_beam.io.gcp.healthcare.dicomcio",
DeprecationWarning)
View on GitHub (pinned to 12126d8942)