Orthanc API Client Dicom Send Error

Utilizing the Python API client I am seeing an error when attempting to send exams.

Error is:

in
orthanc_a.modalities.send(
TypeError: DicomModalities.send() got an unexpected keyword argument ‘modality’

Literally just trying to use this bit of code as-is after importing the orthanc_api_client in python.

from orthanc_api_client import OrthancApiClient, ResourceType, InstancesSet

    # send to a remote modality
    orthanc_a.modalities.send(
        modality='pacsb',
        resources_ids=suid,
        synchronous=True
    )

Only difference here is that I am passing a study uid to the resources ID, though I get this same error when I try to pass anything else to it as well.

Has anyone used this before and encountered a similar problem?

Hi,

My mistake… we have renamed this parameter a few months ago and forgot to change the sample code. Here is the correct one:

# send to a remote modality
orthanc_a.modalities.send(
    target_modality='orthanc-b',
    resources_ids=[study_id],
    synchronous=True
)

Best regards,

Alain

1 Like