These errors will only occur in the homework sets editor. Are there errors rendering problems in actual sets?
As to the error that is shown in the homework sets editor, do you have the patches applied that are shown in https://webwork.maa.org/wiki/Installation_Manual_for_2.17_on_Ubuntu#Miscellaneous_System_Patches? The first patch is related to the error that is shown.
That is specifically for WeBWorK 2.16 or 2.17 though. If you have an earlier version of webwork, that patch won't be available. Note that for WeBWorK 2.18 or 2.19 the patch isn't needed, and you definitely won't get those errors. I highly recommend upgrading when you can. Obviously, don't do that during an active term.