cubewise-code / tm1py

TM1py is a Python package that wraps the TM1 REST API in a simple to use library.
http://tm1py.readthedocs.io/en/latest/
MIT License
190 stars 109 forks source link

Value Error while using execute_mdx_ui_array #213

Closed wifi1677 closed 4 years ago

wifi1677 commented 4 years ago

Describe the bug Getting the below error while using all the array functions for mdx. please take a look at the error.

raw_data = _tm1.cubes.cells.execute_mdx_ui_array(mdx) File "/var/uber/python/lib64/python3.6/site-packages/TM1py/Services/CellService.py", line 617, in execute_mdx_ui_array return Utils.build_ui_arrays_from_cellset(raw_cellset_as_dict=data, value_precision=value_precision) File "/var/uber/python/lib64/python3.6/site-packages/TM1py/Utils/Utils.py", line 175, in build_ui_arrays_from_cellset row.append(float(value_format_string.format(raw_value))) ValueError: Unknown format code 'f' for object of type 'str'

To Reproduce Just any mdx should be fine , i tried multiple different mdx

Expected behavior A clear and concise description of what you expected to happen.

Version TM1py [e.g. 1.3.1] TM1 Server Version: [e.g. 11.4]

Additional context Add any other context about the problem here.

MariusWirtz commented 4 years ago

Hi @wifi1677,

it was @DJHig who originally added this function to TM1py. The way I see it, it is designed to work with numeric data only. Are you perhaps using it on string data?