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 3 months ago

figoyouwei commented 3 months 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 3 months ago

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

figoyouwei commented 3 months ago

TypeError: Object of type method is not JSON serializable

FlorianJacta commented 3 months 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 3 months ago

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

figoyouwei commented 3 months ago

I got the point, thanks