figoyouwei / taipy_success

This is a sample code that tests the deployment on heroku
2 stars 2 forks source link

Task with commit to database error #3

Closed figoyouwei closed 4 weeks ago

figoyouwei commented 4 weeks ago

I added a new task task_cfg_yfin_cmt, it returns error. I have verify the normal workflow, it is fine. https://github.com/figoyouwei/taipy_success/blob/main/app/scenarios/yfin_spx.py

FlorianJacta commented 4 weeks ago

Could you also provide your issues with the error message? I will try on my my side also

figoyouwei commented 4 weeks ago

TypeError: Object of type method is not JSON serializable

FlorianJacta commented 4 weeks ago

And what if you try to create your function for db_manager.commit_data. Like:

def commit_data(...):
    # use db_manager.commit_data
    return what_you_want

Taipy Tasks deal with functions and not methods.

figoyouwei commented 4 weeks ago

Cool, it returns no error after some code like this.

figoyouwei commented 4 weeks ago

I got the point, thanks