oTree Forum >

Otree deployment to Heroku failed

#1 by marcelamello

Hi, Chris!

I tried deploying my app to Heroku using the oTreeHub but had the following issue (copied below) when clicking on "reset DB".

I understand that the problem is that I am using Pandas in my oTree code (I do this since I need to access some CSV databases for my randomization and to upload customized pictures/audio in the experiment).

How can I fix my code so that I can use Pandas in the experiment? I hadn't had this problem when testing my app locally.

Many thanks in advance! 

Resetdb failed.
 Starting process with command `otree resetdb --noinput`
 State changed from starting to up
 Traceback (most recent call last):
   File "/app/.heroku/python/lib/python3.9/site-packages/otree/database.py", line 275, in init_orm
     models = get_models_module(app)
   File "/app/.heroku/python/lib/python3.9/site-packages/otree/common.py", line 75, in get_models_module
     return import_module(module_name)
   File "/app/.heroku/python/lib/python3.9/importlib/__init__.py", line 127, in import_module
     return _bootstrap._gcd_import(name[level:], package, level)
   File "", line 1030, in _gcd_import
   File "", line 1007, in _find_and_load
   File "", line 986, in _find_and_load_unlocked
   File "", line 680, in _load_unlocked
   File "", line 850, in exec_module
   File "", line 228, in _call_with_frames_removed
   File "/app/firm_performance_v0_survey/__init__.py", line 2, in 
     import pandas as pd
 ModuleNotFoundError: No module named 'pandas'
 Process exited with status 1
 State changed from up to complete

#2 by Chris_oTree

You need to put pandas in your requirements.txt.

Write a reply

Set forum username