Ticket #2080 (closed: fixed)

Opened 10 years ago

Last modified 5 years ago

vector<DateAndTime> in mantidplot python interpreter

Reported by: Peter Peterson Owned by: Peter Peterson
Priority: minor Milestone: Iteration 27
Component: MantidPlot Keywords:
Cc: Blocked By:
Blocking: Tester: Martyn Gigg

Description

In order to reproduce the error:

a=LoadSNSEventNexus(Filename="/SNS/PG3/IPTS-1582/0/1879/NeXus/PG3_1879_event.nxs", OutputWorkspace="PG3_1879")
a=a.workspace()
b = a.getRun()
c = b["proton_charge"]
d = c.getStatistics()
print d.mean

Which prints in the script output

---------------------------------------------------------------------------
Wed Dec 15 16:39:19 2010: Script execution started.
---------------------------------------------------------------------------
15289841.846
Traceback (most recent call last):
  File "<string>", line 44, in _ScopeInspector_GetFunctionAttributes
TypeError: No to_python (by-value) converter found for C++ type: std::vector<Mantid::Kernel::DateAndTime, std::allocator<Mantid::Kernel::DateAndTime> >
---------------------------------------------------------------------------
Wed Dec 15 16:39:20 2010: Script execution completed successfully.
---------------------------------------------------------------------------

The fix appears to be exposing vector<Mantid::Kernel::DateAndTime> to python so mantid's python window knows what to do with it.

Change History

comment:1 Changed 10 years ago by Peter Peterson

  • Owner set to Peter Peterson
  • Status changed from new to accepted

comment:2 Changed 10 years ago by Peter Peterson

  • Status changed from accepted to verify
  • Resolution set to fixed

(In [8254]) Exposed a tiny bit of DateAndTime so mantid's python interpreter will stop complaining. Fixes #2080. Also did a slight cleanup of import statements, sorry.

comment:3 Changed 10 years ago by Martyn Gigg

  • Status changed from verify to verifying
  • Tester set to Martyn Gigg

comment:4 Changed 10 years ago by Martyn Gigg

  • Status changed from verifying to closed

Tested with #1890

comment:5 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 2927

Note: See TracTickets for help on using tickets.