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
-
Hello, simple question, is there a way to get the status & log file when running tm1.cells.write(use_ti=True)? I am asking for the case where you would have minor errors. Below a small sample case:
|
Beta Was this translation helpful? Give feedback.
Answered by
MariusWirtz
Mar 16, 2023
Replies: 1 comment 7 replies
-
You can catch the 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 information you need:
|
Beta Was this translation helpful? Give feedback.
7 replies
Answer selected by
autoneurino
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can catch the
TM1pyWritePartialFailureException
exception and access theerror_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.This will provide you with the i…