All three result in the same error. Only difference in the error file is showing the different partitionparticipants commands around the 11th line.
The core count also matches my core count from slurm.
Additionally, it has to be an issue with the partitionparticipants command because if I remove the Solve() command, it still results in the same .err file
Also here is the updated pyscript just in case I wrote it wrong. I only posted a picture of the DistrubutedAllocateCores commands, but all three methods you mentioned previously resulted in the same error file.
Here is also the output file after submitting the job. The output file is also the same across all three methods. One thing I would note is that the PrintSetup() command does not appear in the output file unless it comes before the PartitionParticipants command in the python script file.