CG Wizards > Maya > Troubleshooting > Maya: Fix for ‘file contains unknown nodes or data’

Maya: Fix for ‘file contains unknown nodes or data

Upon trying to save a file and change the file type either from ma to mb or mb to ma, you will get the following error popup and you’re unable to save.

How It Fix it
You can fix it by running the script below which removes the the unknown nodes and data from your scene. For more information on it please visit: Maya: Delete Unknown Nodes and Plugins

Application: Maya
Application Compatibility: 2015 and up.
Script Type: Python

Always save your file before running any script.

import pymel.core as pm

# Check to see if perspective camera exists
if pm.objExists("|persp"):
# Gets the perspective camera and sets it to not be a startup camera then deletes it
perspective_camera = pm.PyNode("|persp"), e=True, startupCamera = False)

# Creates a new camera renames it perspective, hides it, and sets it to be a startup camera
new_perspective_camera =
new_perspective_camera[0].hide()[0], e=True, startupCamera = True)
pm.reorder(new_perspective_camera[0], front=True)

Script Walkthrough