oTree Forum >

Pass data from round 4-20 in app A to app B

#1 by PimPim

Dear all,

I would like to show the table of the results in every round at the end of the experiment. The results are stored in app A, but after finishing app A, the participant will proceed to app B to fill demographic questions. Then I would like to pass the results to app B. However, in the last page of app A, I use,

all_rounds = player.in_all_rounds()
participant.round_players = all_rounds[4:]

in the before_next_page function. I got the following error:

StatementError: (raised as a result of Query-invoked autoflush; consider using a session.no_autoflush block if this flush is occurring prematurely) (builtins.TypeError) cannot pickle 'weakref' object [SQL: UPDATE otree_participant SET _vars=?, _index_in_pages=?, _last_page_timestamp=? WHERE otree_participant.id = ?] [parameters: [{'_index_in_pages': 261, '_vars': {'pvalue': 12, 'pk': 1.1, 'type': 1, 'overtreatdec': [True, False, True, True, True, False], 'obsprob': [2, 2, 1, 1 ... (356 characters truncated) ... ?), Player(???), Player(???), Player(???), Player(???), Player(???), Player(???)]}, '_last_page_timestamp': 1660714199, 'otree_participant_id': 2251}]]


Could you please let me know how to pass multiple rounds data between apps?

Thank you very much in advance.

Kind regards,
Pim

Write a reply

Set forum username