Skip to content

Using the 'top' arg with the 'tm1.cells.execute_mdx_ui_array' method will cause an exception. #1062

@Cubewise-Ronan

Description

@Cubewise-Ronan

Describe the bug
A clear and concise description of what the bug is.

When the "top" parameter is not None in the function tm1.cells.execute_mdx_ui_array, it raises an exception.

Traceback (most recent call last):
  File "C:\Dev\tm1py_service\app\services\MdxView.py", line 90, in query_mdx
    result = tm1.cells.execute_mdx_ui_array(mdx=mdx, top=top)
  File "C:\Dev\tm1py_service\dev\lib\site-packages\TM1py\Services\CellService.py", line 2481, in execute_mdx_ui_array
    return Utils.build_ui_arrays_from_cellset(raw_cellset_as_dict=data, value_precision=value_precision, top=top)
  File "C:\Dev\tm1py_service\dev\lib\site-packages\TM1py\Utils\Utils.py", line 526, in build_ui_arrays_from_cellset
    raw_value = raw_cellset_as_dict['Cells'][ordinal_cells]['Value'] or 0
IndexError: list index out of range

To Reproduce
describe a setup or post a script that reproduces the bug.
tm1.cells.execute_mdx_ui_array(mdx=mdx, top=1)

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

Version
TM1py: 1.11.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions