clarin-eric / switchboard

The Switchboard: a web application serving as a broker between data sets and data processing/analysis tools.
Other
7 stars 2 forks source link

Calling UDPipe fails to load text and language model #176

Closed andmor- closed 3 years ago

andmor- commented 3 years ago

Type some text in the input and open UDPipe.

UDPipe is called with a URL like: https://lindat.mff.cuni.cz/services/udpipe/?data=https%3A%2F%2Fbeta-switchboard.clarin.eu%2Fapi%2Fstorage%2F<resource ID>%3Fmediatype%3D<media type>&model=por

This fails to load both: the input text and the language model in UDPipe.

Comparing to v2.2.3 where this scenarios works as expected, the switchbord is adding: %3Fmediatype%3D<media type> and if I remove this from the URL, then UDPipe loads correctly.

andmor- commented 3 years ago

Also in Firefox 84.0.2 (64-bit) on macOS 11.1 (20C69) , UDPipe UI becomes confused and the subsequent call from v2.2.3 also shows the same problem. A full page reload is needed for it to start working again.

andmor- commented 3 years ago

From VLO: https://switchboard.clarin.eu/#/vlo/https%3A%2F%2Fclarinws.informatik.uni-leipzig.de%2Fclarinwebservices%2Fsentences%2F11022%2F0000-0000-20E3-B%2Fsentencestext%2F/text%2Fplain/deu

vs

https://beta-switchboard.clarin.eu/#/vlo/https%3A%2F%2Fclarinws.informatik.uni-leipzig.de%2Fclarinwebservices%2Fsentences%2F11022%2F0000-0000-20E3-B%2Fsentencestext%2F/text%2Fplain/deu

After selecting "UDPipe", the first link works but only after a page reload. This looks more like an UDPpipe problem. @kosarko can you check?

The second link only works if I manually remove the %3Fmediatype%3Dtext%2Fplain part from the UDP URL. This looks like a Switchboard problem.

andmor- commented 3 years ago

For the first link. It seems like it works every other call.

kosarko commented 3 years ago

@andmor- I'm definitely seeing some odd behavior from udpipe; started an issue for that.

kosarko commented 3 years ago

@andmor- as for the second link; udpipe does a url validation (if it's a valid url it downloads & shows the content; if not it uses the param as text) after decoding the param udpipe gets this

https://beta-switchboard.clarin.eu/api/storage/a38b3a3a-a8bc-4cfd-9f2c-fb9e0ba747b2?mediatype=text/plain

that fails to validate because of the slash in the search part; I guess you need to double encode the search part; so udpipe can see this after decoding:

https://beta-switchboard.clarin.eu/api/storage/a38b3a3a-a8bc-4cfd-9f2c-fb9e0ba747b2?mediatype=text%2Fplain

and indeed the following seems to work (if you are not hitting the other issue); note there is %252F between text and plain https://lindat.mff.cuni.cz/services/udpipe/?data=https%3A%2F%2Fbeta-switchboard.clarin.eu%2Fapi%2Fstorage%2Fa38b3a3a-a8bc-4cfd-9f2c-fb9e0ba747b2%3Fmediatype%3Dtext%252Fplain&model=deu

emanueldima commented 3 years ago

@kosarko Thanks for the analysis, makes sense. Looks like the bug is in the switchboard.

kosarko commented 3 years ago

@andmor- I'm definitely seeing some odd behavior from udpipe; started an issue for that.

Should be fixed

andmor- commented 3 years ago

Great I can confirm that the UDPide side is fixed. And the switchboard production version (2.2.3) is working fine now

andmor- commented 3 years ago

Fix confirmed in 2.3.0-RC3