Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vector<DateAndTime> in mantidplot python interpreter #2927

Closed
peterfpeterson opened this issue Dec 15, 2010 · 1 comment
Closed

vector<DateAndTime> in mantidplot python interpreter #2927

peterfpeterson opened this issue Dec 15, 2010 · 1 comment
Assignees
Labels
Low Priority Things that you don't ever want to be done.
Milestone

Comments

@peterfpeterson
Copy link
Member

In order to reproduce the error:

#!python
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 vectorMantid::Kernel::DateAndTime`` to python so mantid's python window knows what to do with it.

@peterfpeterson
Copy link
Member Author

This issue was originally trac ticket 2080

@peterfpeterson peterfpeterson added Low Priority Things that you don't ever want to be done. MantidPlot labels Jun 3, 2015
@peterfpeterson peterfpeterson self-assigned this Jun 3, 2015
@peterfpeterson peterfpeterson added this to the Iteration 27 milestone Jun 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Low Priority Things that you don't ever want to be done.
Projects
None yet
Development

No branches or pull requests

1 participant