Ticket #2080 (closed: fixed)
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
comment:3 Changed 10 years ago by Martyn Gigg
- Status changed from verify to verifying
- Tester set to Martyn Gigg
Note: See
TracTickets for help on using
tickets.