I can studies for a day by
curl -X POST http://localhost:8042/tools/find -d ‘{“Level”:“Study”,“Expand”:false,“Query”:{“StudyDate”:“20211215-20211215”}}’
Trying it at Debian 11
1.
:~$ /usr/bin/python3 /home/dicom/ArchiveStudiesInTimeRange.py
File “/home/dicom/ArchiveStudiesInTimeRange.py”, line 39
print ‘“%s” is not a valid date!\n’ % date
^
SyntaxError: Missing parentheses in call to ‘print’. Did you mean print(‘“%s” is not a valid date!\n’ % date)?
modified to print(‘“%s” is not a valid date!\n’ % date)
then run and got error 2
2.
:~$ /usr/bin/python3 /home/dicom/ArchiveStudiesInTimeRange.py http://10.21.25.250:8042/ 20211215 /srv/irpen-synology/
Traceback (most recent call last):
File “/home/dicom/ArchiveStudiesInTimeRange.py”, line 27, in
import RestToolbox
ModuleNotFoundError: No module named ‘RestToolbox’
got next exeption without credentials
Traceback (most recent call last):
File “/home/urik/OrthancTools/scripts/ArchiveStudiesInTimeRange.py”, line 61, in
for studyId in RestToolbox.DoGet(‘%s/studies’ % URL):
File “/home/urik/OrthancTools/scripts/RestToolbox.py”, line 65, in DoGet
raise Exception(resp.status)
Exception: 401