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

Unicode not supported for Column access to TableWS #27555

Closed
DanielMurphy22 opened this issue Dec 9, 2019 · 1 comment
Closed

Unicode not supported for Column access to TableWS #27555

DanielMurphy22 opened this issue Dec 9, 2019 · 1 comment
Labels
Low Priority Things that you don't ever want to be done.

Comments

@DanielMurphy22
Copy link
Contributor

Original reporter: [ISIS]/[James Lord]

This is something that should be fixed automatically when we move to Python 3.

Expected behavior

Can access a table column as a list with the syntax MyTable.column[“Column header”], even if writing code that is Python 3 compatible

Actual behavior

TypeError: No registered converter was able to produce a C++ rvalue of type int from this Python object of type unicode
  File "<string>", line 14, in <module>

Steps to reproduce the behavior

Create a table (for example a results table from Muon Analysis)
Open a new script tab in Workbench. Add the following after the standard headers (change the actual table and column names as appropriate):

tab=mtd["ResultsTable"]
colY=tab.column("workspace_name")
print (colY)

Note that removing the “unicode_literals” from the future statement makes the script work as intended.

Platforms affected

Workbench 4.2

@DanielMurphy22 DanielMurphy22 added the Low Priority Things that you don't ever want to be done. label Dec 9, 2019
@martyngigg
Copy link
Member

This is no longer an issue with Python 3 as Boost.Python knows how to deal with unicode automatically.

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

2 participants