[MtoA] Error: defaultArnold Driver can’t create file


You’ll get an error like this if your project path has characters like é or ü or Ô in it.

// Error: [driver_exr] defaultArnoldDriver@driver_exr.RGBA: can't create file ".exr": OpenEXR exception: Permission denied. //

// Error: [driver_jpeg] defaultArnoldDriver@driver_jpeg.RGBA: can't create file ".jpg": Unable to open file ".jpg”

// Error: [driver_png] defaultArnoldDriver@driver_png.RGBA: can't create file ".png": Could not open file ".png"

Arnold can’t create the output file, because the special characters mess up the resolution of the output path, which ends up as an empty string.

So with no path provided, the ouput driver tries to write “.jpg” in the current working directory, which is probably something like C:\Program Files\Autodesk\Maya2018.

Use plain text characters for your project folders.

 

Removing MtoA from Maya scenes


If you don’t use Arnold, but someone has saved your scene files with MtoA loaded, then you’ll get some errors and warnings when you open that scene without MtoA.

// Error: line 0: The camera 'perspShape' has no 'ai_translator' attribute. // 
// Error: line 0: Node "perspShape" has no attribute "ai_translator". // 
// Error: line 0: The camera 'topShape' has no 'ai_translator' attribute. // 
// Error: line 0: Node "topShape" has no attribute "ai_translator". // 
// Error: line 0: The camera 'frontShape' has no 'ai_translator' attribute. // 
// Error: line 0: Node "frontShape" has no attribute "ai_translator". // 
// Error: line 0: The camera 'sideShape' has no 'ai_translator' attribute. // 
// Error: line 0: Node "sideShape" has no attribute "ai_translator". // 
// Error: line 0: The mesh 'pPlaneShape1' has no 'ai_translator' attribute. // 
// Error: line 0: Node "pPlaneShape1" has no attribute "ai_translator". // 
// Error: line 0: The mesh 'pSphereShape1' has no 'ai_translator' attribute. // 
// Error: line 0: Node "pSphereShape1" has no attribute "ai_translator". // 
// Error: line 0: The mesh 'pCubeShape1' has no 'ai_translator' attribute. // 
// Error: line 0: Node "pCubeShape1" has no attribute "ai_translator". // 
// Warning: line 0: Unrecognized node type for node 'defaultArnoldRenderOptions'; preserving node information during this session. // 
// Warning: line 0: Unrecognized node type for node 'defaultArnoldFilter'; preserving node information during this session. // 
// Warning: line 0: Unrecognized node type for node 'defaultArnoldDriver'; preserving node information during this session. // 
// Warning: line 0: Unrecognized node type for node 'defaultArnoldDisplayDriver'; preserving node information during this session. //

Here’s how to remove all the MtoA (aka Arnold) attributes and nodes.

First, don’t load MtoA. Uninstall MtoA.

Now, just loading and saving your scene will get rid of the ai_translator attributes. All that’s left to do is get rid of the unknown nodes. There’s just four (assuming nobody created any Arnold shaders or lights or standins in the scene): the four defaultArnold nodes:

ls -typ "unknown";
// Result: defaultArnoldDisplayDriver defaultArnoldDriver defaultArnoldFilter defaultArnoldRenderOptions //

Here’s a MEL script to remove all unknown MtoA nodes from a scene:

string $mtoaNodes[] = `ls -typ "unknown"`;

for ($node in $mtoaNodes){
	if (`objExists $node` && `unknownNode -q -p $node` == "mtoa"){
		print("Deleting mtoa node " + $node + "\n");
		delete $node;
	}
}

[MtoA] UnicodeEncodeError when rendering


UnicodeDecodeError

If you get this UnicodeEncodeError when you render

# Error: line 1: UnicodeEncodeError: file C:\Program Files\Autodesk\Maya2016\bin\python27.zip\encodings\utf_8.py line 16: ascii #

it’s probably because because the project folder has a special character in the name (for example, an accent mark like é).

If that’s not it, then we’d need more context (hint: everything else that is logged in the script history).

For a project name with a special character, you’ll see something like this in the script history:

file -f -save -options "v=0;";
// C:/maya/projects/New_Projéct/scenes/blank.mb // 
# Error: line 1: UnicodeEncodeError: file D:\Program Files\Autodesk\Maya2017\bin\python27.zip\encodings\utf_8.py line 16: ascii # 
# Error: line 1: UnicodeEncodeError: file D:\Program Files\Autodesk\Maya2017\bin\python27.zip\encodings\utf_8.py line 16: ascii #

 

 

[MtoA] Unable to dynamically load mtoa.mll …The specified procedure could not be found.


If the MtoA plug-in  does not load and you get a “The specified procedure could not be found” error like this:

// Error: line 1: Unable to dynamically load : C:/solidangle/mtoadeploy/2016/plug-ins/mtoa.mll
The specified procedure could not be found.
 // 
// Error: line 1: The specified procedure could not be found.
 (mtoa) //

then there’s a few basic things you need to check first.

Does your processor support SSE4.1?

Support for SSE4.1 is a minimum requirement. You won’t be able to load MtoA or use Arnold if your processor doesn’t support SSE4.1.

Check the environment in Maya

For example, does the PATH include any older versions of MtoA? If you’re on Windows, run the MEL command system(“set”) to get the environment. On OSX or Linux, run system(“printenv”).

Look for any environment variable that has an Arnold or MtoA folder in it. For example, on Windows, you should not have any MtoA bin folders in PATH.

Get a Process Monitor log

If a clean install of MtoA doesn’t work (and the computer does support SSE4.1), then “The specified module could not be found.” usually means there’s a missing dependency. Dependency Walker is a decent, if aging, tool for checking out dependencies, but for leaving no stone unturned, I prefer Process Monitor.

The MtoA plugin (mtoa.mll) depends on a handful of files only. Here’s the log of loaded DLLs for a working MtoA:

process_monitor_mtoa

Here’s a quick walkthrough (no audio) of how to get a Process Monitor log:

Adding Arnold licenses to an existing RLM license server


If you’ve already have an RLM license server up and running, it’s easy to add your Arnold license to that server. Just download the Solid Angle RLM package, extract the solidangle.set and solidangle.opt files from the download, and copy them to your RLM folder. Then do a reread/restart of the server to pick up the Arnold licenses.

Just make sure you’re not running an older version of RLM. The Solid Angle license server (solidangle.set) requires RLM v10.1BL2 or later.

RLM is backwards compatible, which means you can always use a newer version of RLM with an older solidangle.set.

But RLM is not forwards compatible. You cannot use an older RLM with a newer solidangle.set. For example, you cannot use the current solidangle.set ISV server with RLM v9.4BL2.

If you use a newer solidangle.set with an older RLM, you’ll see something like this in the RLM log:

08/22 14:23 (rlm) RLM License Server Version 9.4BL2

        Copyright (C) 2006-2012, Reprise Software, Inc. All rights reserved.

08/22 14:23 (rlm) License server started on SOLIDANGLE-PC
08/22 14:23 (rlm) Server architecture: x86_w1
08/22 14:23 (rlm) License files:
08/22 14:23 (rlm)     arnold.lic
08/22 14:23 (rlm)
08/22 14:23 (rlm) Web server starting on port 5054
08/22 14:23 (rlm) Using TCP/IP port 5053
08/22 14:23 (rlm) Starting ISV servers:
08/22 14:23 (rlm)     ... solidangle on port 60008
08/22 14:23 (rlm) New thread created to watch ISV solidangle
(solidangle) Server settings (version 10) incompatible with RLM v9 software
(solidangle) This settings file must be used with RLM v10 (or later) software
08/22 14:23 (rlm)
08/22 14:23 (rlm) solidangle initialization error: 1, not restarting
08/22 14:23 (rlm)
08/22 14:23 (rlm) Server initialization error.
08/22 14:23 (rlm)
08/22 14:23 (rlm) This indicates either:
08/22 14:23 (rlm)  A settings file incompatible with this RLM version
08/22 14:23 (rlm)  - or -
08/22 14:23 (rlm)  The ISV server is built with an incorrect RLM license
08/22 14:23 (rlm)  - or -
08/22 14:23 (rlm)  The ISV server encountered an error processing its options fi
le.
08/22 14:23 (rlm)

For google: “solidangle initialization error: 1, not restarting”

Entry point not found


An Entry Point Not Found error message might look rather weird (because you’re looking at the decorated name of a function).
mayabatch_Entry_Point_Not_Found
but usually such an error just means that the wrong version of a DLL (in this case, OpenImageIO.dll) is being loaded by the main program (mayabatch in this case). The problem could be as simple as your PATH pointing to another application that ships a different version of the DLL.

Using Dependency Walker, you can check a DLL to see the decorated names of the functions it exports. But usually you don’t have to dig down to that level a detail. Dependency Walker will show you what version of the DLL is being loaded, and that’s usually enough.
depends_openimageio.dll

[MtoA] The case of the renderer that failed to register


In this case, a customer running Maya 2013 on Ubuntu reported this error when he tried to load the mtoa plugin:

API error detected in plugins/mtoa/Main.cpp at line 710: (kFailure): Unexpected Internal Failure 
ERROR | Failed to register renderer 'arnold' 

That specific line in plugins/mtoa/Main.cpp runs these two lines of Python:

import mtoa.cmds.registerArnoldRenderer
mtoa.cmds.registerArnoldRenderer.registerArnoldRenderer()

So I asked the customer to run that Python in the Maya script editor, and that gave us this error:

# Error: ImportError: file 
/usr/autodesk/maya2013-x64/lib/python26.zip/hashlib.py line 63: No module 
named _md5 # 

Now we’re cooking with EVIL gas! I’ve seen these kinds of errors before…

This appears to be general problem with Maya 2013 and pymel (I found a few different posts about this via Google search). For example, this thread from the pymel project, or the Troubleshooting section on this page.

In brief: you need to create some symlinks to the right versions of the libssl.

Another case of a missing entry point


entry_point_not_found
In this case, a user installed the latest MtoA, but when he went to load mtoa.mll in the Plug-in Manager, he got this error:

---------------------------
Settings/Preferences: maya.exe - Entry Point Not Found
---------------------------
The procedure entry point ?IsRenderablePath@CArnoldSession@@SA_NVMDagPath@@@Z could not be located in the dynamic link library mtoa_api.dll. 

From past experience, I knew that the problem was probably the Maya.env file. And sure enough, it looked something like this:

MAYA_RENDER_DESC_PATH = C:\solidangle\mtoadeploy\2013.0.22.0
PATH = %PATH%;C:\solidangle\mtoadeploy\2013.0.22.0\bin;
solidangle_LICENSE=5053@SOLIDANGLE-PC

MAYA_RENDER_DESC_PATH = C:\solidangle\mtoadeploy\2013.0.22.1
PATH = %PATH%;C:\solidangle\mtoadeploy\2013.0.22.1\bin;

Notice that there are two MAYA_RENDER_DESC_PATH and PATH settings. Maya reads just the top two, which are for an older version of mtoa, so when Maya loads mtoa.mll we end up with a “missing entry point” error.

How did this happen? Well, in this case, in-between installs and uninstalls of different versions MtoA, the user had updated Maya.env with his own MAYA_RENDER_DESC_PATH and PATH settings for MtoA. And then the next install of MtoA appended its own settings to the Maya.env file.

The MtoA Installer works like this:

  • Installs make a backup of the existing Maya.env, and then append the environment settings to the existing Maya.env.
  • Uninstalls restore the backup version of Maya.env.

So if your Maya.env already has MtoA settings for MAYA_RENDER_DESC_PATH and PATH settings, then when you install another MtoA, you end up with a problem (because the new settings will be at the bottom, where they are ignored).

Ok, so that’s problem solved. Just remove those extra entries from Maya.env.