#1 by Future
Hello, I'm a new beginner of Otree. I created my first app named "myapp" and when I used "otree zipserver" and went to the localhost website, it turned out "Application error (500) KeyError: 'myapp'". I had updated my otree to version 5 and also had run the code "otree remove_self""otree upcase_constants". What in "myapp" was just a simple survey for participants'gender. Also, there was what said in cmd: Exception in ASGI application Traceback (most recent call last): File "e:\rating\python\lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 396, in run_asgi result = await app(self.scope, self.receive, self.send) File "e:\rating\python\lib\site-packages\uvicorn\middleware\proxy_headers.py", line 45, in __call__ return await self.app(scope, receive, send) File "e:\rating\python\lib\site-packages\starlette\applications.py", line 112, in __call__ await self.middleware_stack(scope, receive, send) File "e:\rating\python\lib\site-packages\starlette\middleware\base.py", line 26, in __call__ await response(scope, receive, send) File "e:\rating\python\lib\site-packages\starlette\responses.py", line 224, in __call__ await run_until_first_complete( File "e:\rating\python\lib\site-packages\starlette\concurrency.py", line 24, in run_until_first_complete [task.result() for task in done] File "e:\rating\python\lib\site-packages\starlette\concurrency.py", line 24, in <listcomp> [task.result() for task in done] File "e:\rating\python\lib\site-packages\starlette\responses.py", line 216, in stream_response async for chunk in self.body_iterator: File "e:\rating\python\lib\site-packages\starlette\middleware\base.py", line 56, in body_stream task.result() File "e:\rating\python\lib\site-packages\starlette\middleware\base.py", line 38, in coro await self.app(scope, receive, send) File "e:\rating\python\lib\site-packages\otree\errorpage.py", line 247, in __call__ raise exc # from None File "e:\rating\python\lib\site-packages\otree\errorpage.py", line 227, in __call__ await self.app(scope, receive, _send) File "e:\rating\python\lib\site-packages\starlette\middleware\base.py", line 25, in __call__ response = await self.dispatch_func(request, self.call_next) File "e:\rating\python\lib\site-packages\otree\middleware.py", line 42, in dispatch response = await call_next(request) File "e:\rating\python\lib\site-packages\starlette\middleware\base.py", line 45, in call_next task.result() File "e:\rating\python\lib\site-packages\starlette\middleware\base.py", line 38, in coro await self.app(scope, receive, send) File "e:\rating\python\lib\site-packages\starlette\middleware\sessions.py", line 75, in __call__ await self.app(scope, receive, send_wrapper) File "e:\rating\python\lib\site-packages\otree\patch.py", line 41, in __call__ raise exc # from None File "e:\rating\python\lib\site-packages\otree\patch.py", line 29, in __call__ await self.app(scope, receive, sender) File "e:\rating\python\lib\site-packages\starlette\routing.py", line 582, in __call__ await route.handle(scope, receive, send) File "e:\rating\python\lib\site-packages\starlette\routing.py", line 243, in handle await self.app(scope, receive, send) File "e:\rating\python\lib\site-packages\otree\views\abstract.py", line 118, in dispatch response = await run_in_threadpool(self.inner_dispatch, request) File "e:\rating\python\lib\site-packages\starlette\concurrency.py", line 40, in run_in_threadpool return await loop.run_in_executor(None, func, *args) File "e:\rating\python\lib\concurrent\futures\thread.py", line 52, in run result = self.fn(*self.args, **self.kwargs) File "e:\rating\python\lib\site-packages\otree\views\abstract.py", line 423, in inner_dispatch return self.get() File "e:\rating\python\lib\site-packages\otree\views\abstract.py", line 481, in get obj = self.get_object() File "e:\rating\python\lib\site-packages\otree\views\abstract.py", line 510, in get_object return { KeyError: 'myapp' I don't know how to fix it. Thank you very much!
#2 by Future
!! I find where the error exists. Now I have fixed it. Please ignore this question.
#3 by gwj
Hello, it seems I have a very similar question just like you. How did you solve the problem? Thank you for your answer!