materialNameSpace was removed for 6.1. I searched the entire source, it is missing.
When you upgrade, always restart Blender. Also, this is an old topic & also very long. It is better for future searchers to have short topics.
@Deltakosh, please close this one.