Skip to main content

Charcoal Editor 2 Documentation

Maya Stub Files for Pylint

The default Python modules for Maya (e.g. maya.cmds, maya.OpenMaya, etc...) are not suitable for Pylint and can result in errors that are false-positives.

Examples of these errors are:

  • [E0401] Unable to import maya.cmds

  • [E1101] Module maya.cmds has no 'ls' method

The solution for this is to use stub files for Maya's Python modules.

Download the Stub Files

  1. Download the Maya Stub Files for Pylint zip file

  2. Extract the zip file to a location on disk

Add the Stubs Path in CE2

  1. Open the CE2 Preferences (Edit->Preferences) and select Pylint in the sidebar

  2. Under Additional Pylint Paths add the path to the stubs folder

  3. Click the OK button