Hi,
Can you please help? Yesterday, my locally run Prodigy stopped working. I run the command in terminal and it all looks fine, but then when I open http://localhost:8080 I get the message "Internal Server Error" on the webpage, and the following appears in Terminal:
prodigy ner.manual evaluation_tagging_dev blank:en /Users/aoifefinn/Documents/Documents–TeHikuMacBookAir/Te_Hiku/Experiments/Eval1-dev-1.txt --label ADJ,AUX,CCONJ,DET,NOUN,NUM,PRON,PROPN,VERB
Using 9 label(s): ADJ, AUX, CCONJ, DET, NOUN, NUM, PRON, PROPN, VERB
Starting the web server at http://localhost:8080 ...
Open the app in your browser and start annotating!
Task exception was never retrieved
future: <Task finished name='Task-3' coro=<RequestResponseCycle.run_asgi() done, defined at /Users/this_user/opt/anaconda3/lib/python3.8/site-packages/uvicorn/protocols/http/httptools_impl.py:388> exception=AttributeError("'str' object has no attribute 'decode'")>
Traceback (most recent call last):
File "/Users/this_user/opt/anaconda3/lib/python3.8/site-packages/uvicorn/protocols/http/httptools_impl.py", line 393, in run_asgi
self.logger.error(msg, exc_info=exc)
File "/Users/this_user/opt/anaconda3/lib/python3.8/logging/init.py", line 1471, in error
self._log(ERROR, msg, args, **kwargs)
File "/Users/this_user/opt/anaconda3/lib/python3.8/logging/init.py", line 1585, in _log
self.handle(record)
File "/Users/this_user/opt/anaconda3/lib/python3.8/logging/init.py", line 1594, in handle
if (not self.disabled) and self.filter(record):
File "/Users/this_user/opt/anaconda3/lib/python3.8/logging/init.py", line 807, in filter
result = f.filter(record)
File "cython_src/prodigy/util.pyx", line 121, in prodigy.util.ServerErrorFilter.filter
File "/Users/this_user/opt/anaconda3/lib/python3.8/site-packages/uvicorn/protocols/http/httptools_impl.py", line 390, in run_asgi
result = await app(self.scope, self.receive, self.send)
File "/Users/this_user/opt/anaconda3/lib/python3.8/site-packages/uvicorn/middleware/proxy_headers.py", line 45, in call
return await self.app(scope, receive, send)
File "/Users/this_user/opt/anaconda3/lib/python3.8/site-packages/fastapi/applications.py", line 140, in call
await super().call(scope, receive, send)
File "/Users/this_user/opt/anaconda3/lib/python3.8/site-packages/starlette/applications.py", line 134, in call
await self.error_middleware(scope, receive, send)
File "/Users/this_user/opt/anaconda3/lib/python3.8/site-packages/starlette/middleware/errors.py", line 178, in call
raise exc from None
File "/Users/this_user/opt/anaconda3/lib/python3.8/site-packages/starlette/middleware/errors.py", line 156, in call
await self.app(scope, receive, _send)
File "/Users/this_user/opt/anaconda3/lib/python3.8/site-packages/starlette/middleware/cors.py", line 76, in call
await self.app(scope, receive, send)
File "/Users/this_user/opt/anaconda3/lib/python3.8/site-packages/starlette/middleware/base.py", line 25, in call
response = await self.dispatch_func(request, self.call_next)
File "/Users/this_user/opt/anaconda3/lib/python3.8/site-packages/prodigy/app.py", line 198, in reset_db_middleware
response = await call_next(request)
File "/Users/this_user/opt/anaconda3/lib/python3.8/site-packages/starlette/middleware/base.py", line 45, in call_next
task.result()
File "/Users/this_user/opt/anaconda3/lib/python3.8/site-packages/starlette/middleware/base.py", line 38, in coro
await self.app(scope, receive, send)
File "/Users/this_user/opt/anaconda3/lib/python3.8/site-packages/starlette/exceptions.py", line 73, in call
raise exc from None
File "/Users/this_user/opt/anaconda3/lib/python3.8/site-packages/starlette/exceptions.py", line 62, in call
await self.app(scope, receive, sender)
File "/Users/this_user/opt/anaconda3/lib/python3.8/site-packages/starlette/routing.py", line 590, in call
await route(scope, receive, send)
File "/Users/this_user/opt/anaconda3/lib/python3.8/site-packages/starlette/routing.py", line 208, in call
await self.app(scope, receive, send)
File "/Users/this_user/opt/anaconda3/lib/python3.8/site-packages/starlette/routing.py", line 41, in app
response = await func(request)
File "/Users/this_user/opt/anaconda3/lib/python3.8/site-packages/fastapi/routing.py", line 129, in app
raw_response = await run_in_threadpool(dependant.call, **values)
File "/Users/this_user/opt/anaconda3/lib/python3.8/site-packages/starlette/concurrency.py", line 25, in run_in_threadpool
return await loop.run_in_executor(None, func, *args)
File "/Users/this_user/opt/anaconda3/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/Users/this_user/opt/anaconda3/lib/python3.8/site-packages/prodigy/app.py", line 316, in static_root
return serve_main()
File "/Users/this_user/opt/anaconda3/lib/python3.8/site-packages/prodigy/app.py", line 305, in serve_main
value=token.decode("utf-8"),
AttributeError: 'str' object has no attribute 'decode'