Ticket #10197 (closed: invalid)
CopyLogs does not work in python with MergeStrategy WipeExisting
Reported by: | Karl Palmen | Owned by: | Martyn Gigg |
---|---|---|---|
Priority: | critical | Milestone: | Release 3.3 |
Component: | Framework | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | #10052 | Tester: | Karl Palmen |
Description
CopyLogs does not work in the following script. The WipeExisting merge strategy is not recognised.
# Create two workspaces demo_ws1 = CreateWorkspace(DataX=range(0,3), DataY=(0,2)) demo_ws2 = CreateWorkspace(DataX=range(0,3), DataY=(0,2)) # Add sample logs first workspace AddSampleLog(Workspace=demo_ws1, LogName='x', LogText='hello world', LogType='String') AddSampleLog(Workspace=demo_ws1, LogName='y', LogText='1', LogType='Number') AddSampleLog(Workspace=demo_ws1, LogName='z', LogText='2', LogType='Number Series') # Add sample logs second workspace AddSampleLog(Workspace=demo_ws2, LogName='x', LogText='hello universe', LogType='String') AddSampleLog(Workspace=demo_ws2, LogName='w', LogText='3', LogType='Number') # Fetch the generated logs run1 = demo_ws1.getRun() log_x1 = run1.getLogData('x') log_y = run1.getLogData('y') log_z = run1.getLogData('z') run2 = demo_ws2.getRun() log_x2 = run2.getLogData('x') log_w = run2.getLogData('w') # Print the log values print "Before CopyLog" print "1st workspace log values x =",log_x1.value,", y =", log_y.value,", z =", log_z.value print "2nd workspace log values x =",log_x2.value,", w =", log_w.value # Copy logs of 1st workspace to 2nd workspace CopyLogs( demo_ws1, demo_ws2, MergeStrategy='•WipeExisting') # Fetch the new logs run1 = demo_ws1.getRun() log_x1 = run1.getLogData('x') log_y = run1.getLogData('y') log_z = run1.getLogData('z') run2 = demo_ws2.getRun() log_x2 = run2.getLogData('x') log_y2 = run2.getLogData('y') log_z2 = run2.getLogData('z') # Print the log values print "After CopyLog" print "1st workspace log values x =",log_x1.value,", y =", log_y.value,", z =", log_z.value print "2nd workspace log values x =",log_x2.value,", y =", log_y2.value,", z =", log_z2.value
Similar scripts work with the other two merge strategies and WipeExisting works in the GUI.
This issue prevents the creation of a usage example with WipeExisting.
Change History
comment:3 Changed 6 years ago by Martyn Gigg
- Status changed from assigned to verify
- Resolution set to invalid
comment:4 Changed 6 years ago by Karl Palmen
- Status changed from verify to verifying
- Tester set to Karl Palmen
Note: See
TracTickets for help on using
tickets.
The script had an invisible character at the start of the 'WipeExisting', which shows up here as a spot ( as in '•WipeExisting' ). After removal of the spot the script worked.