oTree Forum >

Fail to upload codes to Heroku

#1 by PimPim

Hi all,

I have tried to upload code via otree hub and the below error is shown. I did add runtime.txt which has python-3.10.6 to the directory, but after I coded otree zip, runtime.txt disappeared and it cannot be uploaded.

Build output
-----> Building on the Heroku-22 stack
-----> Determining which buildpack to use for this app
-----> Python app detected
-----> Using Python version specified in runtime.txt
 !     Requested runtime 'python-3.9.7' is not available for this stack (heroku-22).
 !     For supported versions, see: https://devcenter.heroku.com/articles/python-support
 !     Push rejected, failed to compile Python app.

 !     Push failed
oTree Hub Advice
        You can fix this error by upgrading oTree.
        Or, if you need to use an older oTree version, 
        then install the Heroku CLI and run this command: "heroku stack:set heroku-20 --app YOUR-SITE-NAME"
        
Could you please let me know your suggestion?
Thank you very much in advance.

Kind regards,
Pim

#2 by Chris_oTree

See the bottom of that output:

 oTree Hub Advice
        You can fix this error by upgrading oTree.
        Or, if you need to use an older oTree version, 
        then install the Heroku CLI and run this command: "heroku stack:set heroku-20 --app YOUR-SITE-NAME"

#3 by PimPim

Dear Chris,

Thank you so much for your reply. I uploaded via CLI and it works.

Kind regards.
Pim

#4 by JuergenMR

regarding this question. I would like to use a pre-coded app (https://www.otreehub.com/projects/otree-realeffort/), when I upload it to Heroku I get exactly the same message. Is it possible to change something in the app or do I need to go the Heroku CLI way? (haven`t done it before - will it affect other experiments I am running?) 

Thank you
Juergen (I am really a beginner, so sorry if the question is really stupid)

#5 by JuergenMR

to add: I use other apps without any problems, so I guess my Otree is updated?

#6 by JuergenMR

okay, got it! sorry

Write a reply

Set forum username