RuntimeError: “csrfmiddlewaretoken”

73 views
Skip to first unread message

Alecia

unread,
Apr 15, 2021, 4:16:44 PM4/15/21
to oTree help & discussion

csrf.PNGHi All,

I have been getting this error message but only while running sessions in the lab, and I am unsure about what it means or how to resolve it.

From Sentry, it is a RuntimeError that says “dictionary changed size during iteration”. When that happens a “csrfmiddlewaretoken” is being appended to dictionary. I am not sure what that “csrfmiddlewaretoken” is, or why it is being appended. In other cases, the error message says “a set changed size during iteration”. Similarly, a csrfmiddlewaretoken” is being appended to a set.

I have attached the full error message and a screenshot of the very end.


Thanks in advance,

Alecia

RuntimeError_ dictionary changed size during iteration.pdf

Chris @ oTree

unread,
Apr 15, 2021, 10:17:23 PM4/15/21
to Alecia, oTree help & discussion
I think this issue was resolved a while back. Try updating otree to the latest 3.x or better yet to 5.x. 

Sent from my phone

On Apr 16, 2021, at 4:16 AM, Alecia <evans....@gmail.com> wrote:


--
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/a6d7f94c-8e29-4356-bbd1-a493338a42d3n%40googlegroups.com.
<csrf.PNG>
<RuntimeError_ dictionary changed size during iteration.pdf>

Alecia

unread,
Apr 15, 2021, 11:33:43 PM4/15/21
to oTree help & discussion
Chris,

Thank you. 

I was using the latest 3.x.  I will go ahead and upgrade to 5.x.

Alecia

Chris @ oTree

unread,
Apr 16, 2021, 1:28:02 AM4/16/21
to Alecia, oTree help & discussion
Ok, by the way could you send me the sentry issue?

Sent from my phone

On Apr 16, 2021, at 11:33 AM, Alecia <evans....@gmail.com> wrote:

Chris,
Reply all
Reply to author
Forward
0 new messages