oTree Forum >

AttributeError: module 'rules' has no attribute 'Constants'

#1 by gonarr

Please see Heroku log below. Any help is greatly appreciated!


2022-10-29T18:23:30.698218+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.9/site-packages/otree/asgi.py", line 12, in <module>
2022-10-29T18:23:30.698581+00:00 app[web.1]:     from .urls import routes
2022-10-29T18:23:30.698581+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.9/site-packages/otree/urls.py", line 190, in <module>
2022-10-29T18:23:30.698582+00:00 app[web.1]:     routes = get_urlpatterns()
2022-10-29T18:23:30.698582+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.9/site-packages/otree/urls.py", line 142, in get_urlpatterns
2022-10-29T18:23:30.698582+00:00 app[web.1]:     name_in_url = models_module.Constants.name_in_url
2022-10-29T18:23:30.698582+00:00 app[web.1]: AttributeError: module 'rules' has no attribute 'Constants'
2022-10-29T18:23:31.056897+00:00 heroku[web.1]: Process exited with status 1
2022-10-29T18:23:31.103170+00:00 heroku[web.1]: State changed from starting to crashed
2022-10-29T18:23:53.898978+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=ab2022inference.herokuapp.com request_id=19c1b4b6-e5de-4355-ae65-5ddc482a8d9f fwd="128.12.123.162" dyno= connect= service= status=503 bytes= protocol=https

#2 by gonarr

Importantly, I don't get this error when running locally. Works well locally.

#3 by gonarr

Now I solved that but still get this error: 

2022-10-29T18:31:30.754233+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=ab2022inference.herokuapp.com request_id=53bd3588-77ef-4d33-a53e-c20f504158af fwd="128.12.123.162" dyno= connect= service= status=503 bytes= protocol=https

Write a reply

Set forum username