My apologies!
I’ve established a connection from my Orthanc server to a DICOM modality, and, in practice, I am able to retrieve data from it and store it in the StorageDirectory set in the configuration file. However, my wish is to implement a custom storage area, and for this I am using the sample provided in Python plugin for Orthanc — Orthanc Book documentation
The Python plugin itself seems to work as I successfully ran the sample.py file that the plugin comes with. When implementing the script above as is, I am facing a “permission denied” error when retrieving data. To this I have the following question: does Orthanc try to store the data in the StorageDirectory that specified in the configuration file, but in the new format? Or where does it try to store the data when using the script as is?
Adding to my previous post, I tried to change the path that is set in the Python script by appending /raid/data/ to it, as this is where I want to set-up the custom storage area. However, this results in the following logfile output (in verbose mode):
W1219 11:51:10.567225 OrthancRestSystem.cpp:909] REST API call has switched the log level to: verbose
I1219 11:51:18.284910 HttpServer.cpp:1244] (http) POST /queries/f2f788b8-0ef0-47b1-89a4-b897126b86bf/answers/2/retrieve
E1219 11:51:18.285124 Toolbox.cpp:2335] Cannot parse JSON: * Line 1, Column 1
Syntax error: value, object or array expected.
W1219 11:51:18.285153 OrthancRestModalities.cpp:949] Driving C-Move SCU on remote modality ulna to target modality ORTHANC
I1219 11:51:18.285561 JobsRegistry.cpp:731] New job submitted with priority 0: 94d26415-0d76-4ca6-9e2f-d18b25b7aaca
I1219 11:51:18.285619 JobsEngine.cpp:134] (jobs) Executing job with priority 0 in worker thread 0: 94d26415-0d76-4ca6-9e2f-d18b25b7aaca
I1219 11:51:18.285864 DicomAssociation.cpp:275] (dicom) Opening a DICOM SCU connection without DICOM TLS from AET “ORTHANC” to AET “ulna” on host XX.XX.X.XX:XXXX (manufacturer: Generic, timeout: 10s)
I1219 11:51:18.346888 CommandDispatcher.cpp:333] (dicom) Association Received from AET ulna on IP XX.XX.X.XX
I1219 11:51:18.346993 main.cpp:317] Incoming connection from AET ulna on IP XX.XX.X.XX, calling AET ORTHANC
I1219 11:51:18.347047 CommandDispatcher.cpp:664] (dicom) Association Acknowledged (Max Send PDV: 4084) to AET ulna on IP XX.XX.X.XX
I1219 11:51:18.356548 main.cpp:352] Incoming Store request from AET ulna on IP XX.XX.X.XX, calling AET ORTHANC
E1219 11:51:18.369555 PluginsManager.cpp:153] Error in the Python StorageCreate callback, traceback:
<class ‘PermissionError’>
[Errno 13] Permission denied: ‘/raid/data/attachment-1-78e2a305-157b-40af-bead-32dad388922e’
File “/etc/orthanc/sample.py”, line 11, in OnCreate
with open(GetPath(uuid, contentType), ‘wb’) as f:
E1219 11:51:18.370467 StoreScp.cpp:198] Exception while storing DICOM: Error encountered within the plugin engine
E1219 11:51:18.413735 OrthancException.cpp:58] Error in the network protocol: C-MOVE SCU to AET “ulna” has failed with DIMSE status 0xFE00
I1219 11:51:18.415907 CommandDispatcher.cpp:929] (dicom) Finishing association with AET ulna on IP XX.XX.X.XX: DUL Peer Requested Release
I1219 11:51:18.415930 CommandDispatcher.cpp:937] (dicom) Association Release with AET ulna on IP XX.XX.X.XX
I1219 11:51:18.427074 JobsRegistry.cpp:504] Job has completed with failure: 94d26415-0d76-4ca6-9e2f-d18b25b7aaca
E1219 11:51:18.427170 OrthancException.cpp:58] Error in the network protocol: C-MOVE SCU to AET “ulna” has failed with DIMSE status 0xFE00
Let me know if more information is needed!