When downloading a resource, Wn will detect if an exception was thrown, but not if the server returned a valid error message (e.g., status 404 or 500). The current error message to the user is not very helpful:
>>> wn.download('ewn:2020') # currently returning 500 Server Error
Download (0 bytes) Complete
Traceback (most recent call last):
...
wn.Error: not a valid lexical resource: /home/goodmami/.wn_data/downloads/3d808000775f658597bc71e9d4870059ccc7965f
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
...
wn.Error: could not add downloaded file: /home/goodmami/.wn_data/downloads/3d808000775f658597bc71e9d4870059ccc7965f
You might try deleting the cached file and trying the download again.
It would be better if the user got a message that the server was giving an error and not that the (empty) file is somehow invalid.
When downloading a resource, Wn will detect if an exception was thrown, but not if the server returned a valid error message (e.g., status 404 or 500). The current error message to the user is not very helpful:
It would be better if the user got a message that the server was giving an error and not that the (empty) file is somehow invalid.