Open michmx opened 8 months ago
Thank you for the info. This actually happens also in LHCb production instance (also v8.0.x):
2024-02-23 08:48:08 UTC None/[849602392]JobWrapper INFO: Site has the following local SEs: Glasgow-DST, Glasgow_MC-DST
2024-02-23 08:48:08 UTC None/[849602392]JobWrapper WARN: This should never happen
2024-02-23 08:48:08 UTC None/[849602392]JobWrapper WARN: Optimizer information could not be converted to a dictionary will call catalog directly
The good news is that it is not dangerous.
I suspect an encode
is needed at some point, we had in more recent past a bunch of cases like this, some fixed e.g. in https://github.com/DIRACGrid/DIRAC/pull/5854
Maybe simply this line in JobWrapper:
optDict, _length = DEncode.decode(self.optArgs["InputData"])
should become
optDict, _length = DEncode.decode(self.optArgs["InputData"].encode())
@fstagni Thanks a lot for the check and the confirmation that also happens on LHCb.
We have not been able to test the addition of .encode()
yet as we got distracted with another problem, but after testing we will report the outcome.
We are using DIRAC 8.0.37 + our Belle extension. At the pilot logs, we are observing the following error message:
The warning comes from an exception at DIRAC/Core/Utilities/DEncode.py#L525 :
Then
This should never happen
... happensThe issue seems to be that
decode()
gets a str fromself.optArgs["InputData"]
, instead of bytes during the JobWrapper execution:We have confirmed that the information is properly stored inside
InputData
in the tableOptimizerParameters
at the JobDB, and seems to be encoded:And we can reproduce the return of a string using the JobDB:
But according to what the
decode()
function expects at DEncode.py, this should bebytes
.Have you experienced a similar issue recently? We found that you had the same warnings at #2421, which resulted in introducing the
decode()
at the JobWrapper.Additional information on MySQLdb version: