First of all: Why would you ever do this ...? Do you hate yourself? Or do you just like to suffer?
I was wanting to start a fun side-save. It's not like Everything Spoilage: Random would make pY strictly harder - just weirder.
And second:
Could you give us the complete modlist you are using?
In addition to your mod, I was running the following:
Milestones = "1.4.7",
Placeables = "1.5.4",
SpeedControl = "2.0.1",
["aai-loaders"] = "0.2.7",
["aai-loaders-stacking-filtering-py-fork"] = "0.1.2",
base = "2.0.72",
["drills-of-drills"] = "2.0.4",
["elevated-rails"] = "2.0.72",
["enable-all-feature-flags"] = "1.0.2",
["factories-in-tight-spaces"] = "0.1.24",
factoryplanner = "2.0.43",
flib = "0.16.5",
["inserter-throughput"] = "0.1.6",
["mining-patch-planner"] = "1.7.14",
["not-enough-parameters"] = "1.0.1",
["ore-eraser-2"] = "0.2.4",
py_quick_start = "3.0.2",
pyalienlife = "3.0.61",
pyalienlifegraphics = "3.0.11",
pyalienlifegraphics2 = "3.0.2",
pyalienlifegraphics3 = "3.0.4",
pyalternativeenergy = "3.1.36",
pyalternativeenergygraphics = "3.0.6",
pycoalprocessing = "3.0.44",
pycoalprocessinggraphics = "3.0.9",
pycranes = "1.1.1",
pyfusionenergy = "3.0.17",
pyfusionenergygraphics = "3.0.4",
pyhightech = "3.0.18",
pyhightechgraphics = "3.0.3",
pyindustry = "3.0.20",
pyindustrygraphics = "3.0.3",
pymodpack = "3.0.0",
pypetroleumhandling = "3.0.22",
pypetroleumhandlinggraphics = "3.0.5",
pypostprocessing = "3.0.41",
pyrawores = "3.0.25",
pyraworesgraphics = "3.0.4"
I'm pretty sure I know what the error is because of Drills of Drills (one of my mods) had a similar issue arising from a prototype being created... and then renamed in final-fixes after I ran, leading to weird crashes.
The issue is caused by line 36 of pypostprocessing, where it's trying to map out spoil chains and loops to apply automatic spoil_level modification to change default inserter priority.