Skip to content

How to get log files on minor error when using tm1.cells.write with use_ti=True? #878

Answered by MariusWirtz
autoneurino asked this question in Q&A
Discussion options

You must be logged in to vote

You can catch the TM1pyWritePartialFailureException exception and access the error_log_files property.
Now that you know the names of the error log files, you can use the get_error_log_file_content function to retrieve the content of the error log file.

with TM1Service(**tm1_cloud) as tm1:
    cells = {
        ("not-existing", "not-existing"): -1
    }
    try:
        tm1.cells.write("System Info", cells, use_ti=True)

    except TM1pyWritePartialFailureException as ex:
        files = ex.error_log_files
        for file_name in files:
            error_log_content = tm1.processes.get_error_log_file_content(file_name)
            print(error_log_content)

This will provide you with the i…

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@MariusWirtz
Comment options

@Kevin-Dekker
Comment options

@MariusWirtz
Comment options

@MariusWirtz
Comment options

@Kevin-Dekker
Comment options

Answer selected by autoneurino
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants