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

Potential Bug in "write_dataframe_async" function #1149

Closed
bdunleavy22 opened this issue Sep 25, 2024 · 2 comments
Closed

Potential Bug in "write_dataframe_async" function #1149

bdunleavy22 opened this issue Sep 25, 2024 · 2 comments
Labels

Comments

@bdunleavy22
Copy link

Describe the bug
Sadly because of how I was handling errors I did not get the full traceback, I only got the following: "'TM1pyWriteFailureException' object has no attribute 'attempts'"

To Reproduce
I wasn't able to reproduce it, but because of the error handling problem, I have a theory.
In CellService.py, write_dataframe_async function, lines 970-971, python handles TM1pyWritePartialFailureException and TM1pyWriteFailureException in the same way, by adding them to failures/exceptions. Then in lines 980-983, a consolidated TM1pyWritePartialFailureException is raised, where in line 983, attempts are defined by attempts=sum([exception.attempts for exception in exceptions]. This trys to retrieve the attribute attempts from exception, however in Exceptions.py, TM1pyWritePartialFailureException has an attribute attempts but TM1pyWriteFailureException does not.

So to recreate this issue, I would imagine you would need to use the write_dataframe_async function and have an async executor raise a TM1pyWriteFailureException

Expected behavior
Async errors to be consolidated together and raised.

Version
TM1py 2.0.4
TM1 Server Version: 11.8.02500.3

MariusWirtz added a commit that referenced this issue Sep 27, 2024
@MariusWirtz
Copy link
Collaborator

I think you are onto something @bennybooo22

Please confirm that #1150 resolves the issue

@bdunleavy22
Copy link
Author

That looks like it will work, Thank you!

MariusWirtz added a commit that referenced this issue Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants