otree 5 behind nginx: Unsupported upgrade request

398 views
Skip to first unread message

s.j.v...@exeter.ac.uk

unread,
Jun 25, 2021, 5:47:09 AM6/25/21
to oTree help & discussion
I am running otree apps in Docker containers on a linux server, which sit behind an nginx server, and use letsencrypt certificates.

I recently installed one running otree version 5.x and when I access the URL the web page just reports: "Unsupported upgrade request".

I found this post: https://groups.google.com/g/otree/c/NKcFL2CwKB8/m/icDOTX_bCQAJ which suggested installing a different version of uvicorn - this does indeed seem to solve the issue, but I get the following warnings:

otree 5.2.6 requires uvicorn==0.13.4, but you have uvicorn 0.14.0 which is incompatible.
otree 5.2.6 requires websockets==8.1, but you have websockets 9.1 which is incompatible.

The app seems fine, and runs now, but what issues am I likely to encounter that I don't yet know about, and is otree going to move onto these versions at any point?

Thanks for you help
Scott

Max R. P. Grossmann

unread,
Jun 25, 2021, 5:51:58 AM6/25/21
to s.j.v...@exeter.ac.uk, oTree help & discussion
Hi Scott,

Can you try my nginx config (see attachment)? My server, which seems to be similar to yours, works just fine with oTree's most recent release.

Best,

Max
> --
> 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/8c9fb6a8-cef7-49ed-a97a-e269fc79c0f9n%40googlegroups.com.

nginx_otree.txt

Chris @ oTree

unread,
Jun 25, 2021, 5:56:03 AM6/25/21
to oTree help & discussion
It should be fine to install uvicorn[standard] as that post suggests, but you should specify the version so that it matches what oTree installs automatically: 

pip3 install uvicorn[standard]==0.13.4

s.j.v...@exeter.ac.uk

unread,
Jun 25, 2021, 9:40:16 AM6/25/21
to oTree help & discussion
Hi Max,

Thanks for the reply, but made no difference, still got the error with a default Docker build

s.j.v...@exeter.ac.uk

unread,
Jun 25, 2021, 9:42:41 AM6/25/21
to oTree help & discussion
Hi Chris,

This fixes the issue. Slightly concerned I'll need to track the version otree is using as I move forward though, and it takes a while to build PyYAML and uvloop. But at least I can move forward.

Thanks
Scott
Reply all
Reply to author
Forward
0 new messages