Failure in uploading otreezip

385 views
Skip to first unread message

joya.zh...@gmail.com

unread,
Sep 16, 2021, 12:25:30 PM9/16/21
to oTree help & discussion
Hi,

I created a new app in heroku and tried to upload the otree.zip file to otree hub, however, I kept receiving the error message. What should I do? Thanks very much!

-----> Building on the Heroku-20 stack -----> Using buildpack: heroku/python -----> Python app detected -----> Using Python version specified in runtime.txt ! Requested runtime (python-3.7.5) is not available for this stack (heroku-20). ! Aborting. More info: https://devcenter.heroku.com/articles/python-support ! Push rejected, failed to compile Python app. ! Push failed

Best,
Junya

Chris Crabbe

unread,
Sep 16, 2021, 1:00:00 PM9/16/21
to joya.zh...@gmail.com, oTree help & discussion
Hi Junya -

According to your error message, python 3.7.5 in your runtime.txt isn't available in the new heroku runtime stack.

According to heroku here:  https://devcenter.heroku.com/articles/python-support#supported-runtimes, python 3.7.12 is available, so updating your runtime.txt to that version should work.

Thanks,
--Chris

--
You received this message because you are subscribed to the Google Groups "oTree help & discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to otree+un...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/otree/aa0b4bff-cb0f-444a-8f89-405f8be64dafn%40googlegroups.com.

Chris Crabbe

unread,
Sep 16, 2021, 3:59:14 PM9/16/21
to joya.zh...@gmail.com, oTree help & discussion
Hi Junya -

runtime.txt is a file that you can add to your project's root directory to tell heroku what version of Python you're using.  To use 3.7.12 you would just create a file called runtime.txt and have it contain one line:

python-3.7.12

And then include that file in the otreezip you're uploading to heroku.

Thanks,
--Chris

On Thu, Sep 16, 2021 at 12:52 PM joya.zh...@gmail.com <joya.zh...@gmail.com> wrote:
Hi Chris,

Thanks so much for your response, I have tried to search online, but where can I update my runtime.txt?

Best,
Junya

joya.zh...@gmail.com

unread,
Sep 16, 2021, 4:40:53 PM9/16/21
to oTree help & discussion
Hi Chris,

Thanks so much! I have fixed this. However, I got a lot errors with the requirement.txt as well. Is it because my new heroku app is using strack heroku20 instead of heroku18? 

Best,
Junya

Chris @ oTree

unread,
Sep 16, 2021, 4:43:12 PM9/16/21
to oTree help & discussion
what errors?
heroku20 is fine.

joya.zh...@gmail.com

unread,
Sep 16, 2021, 4:48:34 PM9/16/21
to oTree help & discussion
Hi Chris,

It seems many lines in my requirement.txt are wrong... I have deleted at around 10 lines so far.  I am so confused as I never encounted such errors before.
The most recent error message is:

ERROR: Could not find a version that satisfies the requirement navigator-updater==0.2.1 (from -r /tmp/build_30c564d5/requirements.txt (line 61)) (from versions: none) ERROR: No matching distribution found for navigator-updater==0.2.1 (from -r /tmp/build_30c564d5/requirements.txt (line 61)) ! Push rejected, failed to compile Python app.

Best,
Junya

Chris @ oTree

unread,
Sep 16, 2021, 4:51:52 PM9/16/21
to oTree help & discussion
can you show your requirements.txt?
navigator-updater is not part of otree, maybe you have some extra unnecessary stuff there?
try putting this line at the top:

# oTree-may-overwrite-this-file

then, otree will automatically keep that file up to date with the correct requirements.

joya.zh...@gmail.com

unread,
Sep 16, 2021, 5:36:29 PM9/16/21
to oTree help & discussion
Hi Chris,

Thanks very much!

Below is my original requirement.txt. It has many error messages when building up the dataset. 

-r requirements_base.txt
psycopg2
aiofiles==0.6.0
anaconda-client==1.7.2
anaconda-navigator==1.9.12
appnope==0.1.0
asgi-redis==1.4.3
asgiref==3.4.1
asn1crypto==1.3.0
async-timeout==3.0.1
attrs==19.3.0
autobahn==19.6.2
Automat==0.8.0
backcall==0.1.0
beautifulsoup4==4.8.2
bleach==3.1.0
certifi==2020.6.20
cffi==1.13.2
chardet==3.0.4
click==7.1.2
clyent==1.2.2
conda==4.8.3
conda-build==3.18.11
conda-package-handling==1.6.0
constantly==15.1.0
cryptography==2.8
cssselect==1.1.0
cycler==0.10.0
decorator==4.4.1
defusedxml==0.6.0
Django==3.2.6
django-datetime-widget==0.9.3
djangorestframework==3.12.4
entrypoints==0.3
filelock==3.0.12
glob2==0.7
h11==0.12.0
hyperlink==19.0.0
idna==2.8
importlib-metadata==1.5.0
incremental==17.5.0
inflect==4.1.0
ipykernel==5.1.4
ipython==7.12.0
ipython-genutils==0.2.0
ipywidgets==7.5.1
itsdangerous==1.1.0
jaraco.itertools==5.0.0
jedi==0.16.0
Jinja2==2.11.1
joblib==0.14.1
json5==0.9.0
jsonschema==3.2.0
jupyter-client==5.3.4
jupyter-core==4.6.1
jupyterlab==1.2.6
jupyterlab-server==1.0.6
kiwisolver==1.2.0
libarchive-c==2.8
lief==0.9.0
lxml==4.5.0
MarkupSafe==1.1.1
matplotlib==3.3.0
mistune==0.8.4
mkl-fft==1.0.15
mkl-random==1.1.0
mkl-service==2.3.0
more-itertools==8.2.0
msgpack-python==0.5.6
navigator-updater==0.2.1
nbconvert==5.6.1
nbformat==5.0.4
nltk==3.4.5
notebook==6.0.3
numpy==1.18.1
olefile==0.46
otree==5.3.1
otree-tools==1.1.15
pandas==1.0.0
pandocfilters==1.4.2
parsel==1.5.2
parso==0.6.0
pexpect==4.8.0
pickleshare==0.7.5
Pillow==7.0.0
pkginfo==1.5.0.1
prometheus-client==0.7.1
prompt-toolkit==3.0.3
Protego==0.1.16
psutil==5.6.7
ptyprocess==0.6.0
pyasn1==0.4.8
pyasn1-modules==0.2.8
pycosat==0.6.3
pycparser==2.19
PyDispatcher==2.0.5
Pygments==2.5.2
PyHamcrest==2.0.0
pyOpenSSL==19.1.0
pyparsing==2.4.7
pyrsistent==0.15.7
PySocks==1.7.1
python-dateutil==2.8.1
python-multipart==0.0.5
pytz==2019.3
PyYAML==5.3
pyzmq==18.1.1
QtPy==1.9.0
queuelib==1.5.0
redis==2.10.6
requests==2.22.0
ruamel-yaml==0.15.87
scikit-learn==0.22.1
scipy==1.4.1
Scrapy==1.8.0
Send2Trash==1.5.0
service-identity==18.1.0
six==1.14.0
sklearn==0.0
soupsieve==1.9.5
SQLAlchemy==1.3.22
sqlparse==0.4.1
starlette==0.14.1
terminado==0.8.3
testpath==0.4.4
tornado==6.0.3
tqdm==4.42.0
traitlets==4.3.3
Twisted==19.10.0
txaio==18.8.1
typing-extensions==3.10.0.0
urllib3==1.25.8
uvicorn==0.13.4
w3lib==1.21.0
wcwidth==0.1.8
webencodings==0.5.1
websockets==8.1
widgetsnbextension==3.5.1
WTForms==2.3.3
WTForms-SQLAlchemy==0.2
xmltodict==0.12.0
zipp==2.1.0
zope.interface==4.7.1

Best,
Junya

Chris @ oTree

unread,
Sep 16, 2021, 5:54:39 PM9/16/21
to oTree help & discussion
delete all that stuff and replace with the line I suggested above. the next time you run 'otree zip', it will automatically write the correct stuff in there.
Reply all
Reply to author
Forward
0 new messages