- Add ConnectionReset except in Server to catch network interactions

- Add info about how to use pyOpenRPA with both bitness
dev-linux
Ivan Maslov 3 years ago
parent d31437c3e8
commit baf928ded2

@ -4,6 +4,21 @@
Here you can find the functions description for interaction with desktop GUI applications
How to use both x32 and x64 python processes (it can be helpfully, if another app GUI is on another bitness than your app)
.. code-block:: python
from pyOpenRPA.Robot import UIDesktop
#Section for robot init
lPyOpenRPA_SettingsDict = {
"Python32FullPath": "..\\Resources\\WPy32-3720\\python-3.7.2\\python.exe", #Set from user: "..\\Resources\\WPy32-3720\\python-3.7.2\\OpenRPARobotGUIx32.exe"
"Python64FullPath": "..\\Resources\\WPy64-3720\\python-3.7.2.amd64\\python.exe", #Set from user
"Python32ProcessName": "pyOpenRPA_UIDesktopX32.exe", #Config set once
"Python64ProcessName": "pyOpenRPA_UIDesktopX64.exe" #Config set once
}
# Init the pyOpenRPA configuration
UIDesktop.Utils.ProcessBitness.SettingsInit(lPyOpenRPA_SettingsDict)
# Now you can use pyOpenRPA with both bitness.
.. automodule:: pyOpenRPA.Robot.UIDesktop
:members:
:autosummary:

@ -319,6 +319,7 @@ class testHTTPServer_RequestHandler(BaseHTTPRequestHandler):
lFileObject.close()
# ResponseContentTypeFile
def ResponseDictSend(self):
lL = gSettingsDict["Logger"]
inResponseDict = self.OpenRPAResponseDict
# Send response status code
self.send_response(inResponseDict["StatusCode"])
@ -329,9 +330,12 @@ class testHTTPServer_RequestHandler(BaseHTTPRequestHandler):
for lItemKey, lItemValue in inResponseDict["SetCookies"].items():
self.send_header("Set-Cookie", f"{lItemKey}={lItemValue}")
#Close headers section in response
self.end_headers()
# Write content as utf-8 data
self.wfile.write(inResponseDict["Body"])
try:
self.end_headers()
# Write content as utf-8 data
self.wfile.write(inResponseDict["Body"])
except ConnectionResetError as e:
if lL: lL.warning(f"An existing connection was forcibly closed by the remote host - OK for the network interactions (ConnectionResetError: [WinError 10054])")
def do_GET(self):
try:
self.OpenRPA = {}

Loading…
Cancel
Save