Hi!
I tried but did not work.
I’m using the latest version with Python 2.7, both Windows and Linux.
First attempt, prompts to install the module httplib2.
My Configuration.json
“OrthancPeers” : {
“pacsbr” : [ “https://my.ip”, “user”, “pass” ]
},
My HighPerformanceAutoRouting.py
lines: 5-6
URL = ‘http://localhost:8042’
TARGET = ‘pacsbr’
line: 96
RestToolbox.DoPost(‘%s/peers/pacsbr/store’ % URL, instances)
Result in Linux:
Samples/Python# python ./HighPerformanceAutoRouting.py
Current queue size: 0
Exception in thread Thread-2:
Traceback (most recent call last):
File “/usr/lib/python2.7/threading.py”, line 552, in __bootstrap_inner
self.run()
File “/usr/lib/python2.7/threading.py”, line 505, in run
self.__target(*self.__args, **self.__kwargs)
File “./HighPerformanceAutoRouting.py”, line 50, in Producer
‘limit’ : 4 # Retrieve at most 4 changes at once
File “/home/OrthancUser/Orthanc/Resources/Samples/Python/RestToolbox.py”, line 25, in DoGet
raise Exception(resp.status)
Exception: 401
Current queue size: 0
Current queue size: 0
Current queue size: 0
Result in Windwos:
C:>Python27\python.exe Orthanc\HighPerformanceAutoRouting.py
Current queue size: 0
Current queue size: 0
Exception in thread Thread-2:
Traceback (most recent call last):
File “C:\Python27\lib\threading.py”, line 808, in __bootstrap_inner
self.run()
File “C:\Python27\lib\threading.py”, line 761, in run
self.__target(*self.__args, **self.__kwargs)
File “Orthanc\HighPerformanceAutoRouting.py”, line 46, in Producer
‘limit’ : 4 # Retrieve at most 4 changes at once
File “C:\Orthanc\RestToolbox.py”, line 25, in DoGet
raise Exception(resp.status)
Exception: 401
401 is for The request failed with HTTP status 401: Unauthorized
Thanks,
Vinicius