usea icon indicating copy to clipboard operation
usea copied to clipboard

Exception in WSD container

Open twktheainur opened this issue 2 years ago • 0 comments

Dear developers,

I encountered the following error with a fully local deployment through docker-compose: File "/elg/usea_service/app.py", line 165, in wsd_response_handler for word in data["tokens"]: └ {'detail': "Server Error: 'Word' object has no attribute 'start_char'"}

By entering the wsd container and looking through the python code, the issue is located /app/sapienzanlp/predictors/wsd.py, starting line 305. The WsdWord dataclass is instanciated for each Word instance, and it appears that Word (and thus WsdWord its subclass) no longer has the start_char/end_char attributes.

By removing the two parameters and restarting the container the issue went away. This would be easy to fix in the next release of the WSD image on docker hub. The issue does not occur in the online demo API so it must have been fixed there

twktheainur avatar Mar 22 '23 14:03 twktheainur