oTree Forum >

Command Line Bots - Custom export

#1 by Student (edited )

Hi,

At the tutorial page, https://otree.readthedocs.io/en/latest/misc/bots_advanced.html, it suggests using the --export flag to export the results to a CSV file. This drops the 'standard' oTree CSV Data Export files into the current folder i.e. one per app. 

There's no sign of the per-app custom exports I have set up. This is important, as the plain CSVs that oTree outputs aren't very useful in this setting. How can I specify that I'd like the custom exports run instead of (or in addition to) the standard output? Can I overload the export function somewhere in oTree? The run_all_bots_for_session_config method in otree/bots/runner.py looks like it might be the right place for this, but I've no idea how to fork it or overwrite the version that's running on my machine. 

The ability to be able to run 100 subjects through the app and examine the custom exported CSVs is very useful. But if the custom exports can't be output, I'll have to run browser bots on the command line pointed at the remote Heroku server instead, which will be much more time-consuming. 

I'd appreciate and help with this. 

Thanks.

#2 by Student

Would appreciate any help on this. A member suggested in the old Google group:

'I've found where I needed to tweak otree-core to get it to output the custom export with bot data.  Happy to open a PR if you are interested.'  

There was no further message in the conversation, though.

Write a reply

Set forum username