Maya Issue 2011-12, Errno 2. Can't open File

Hi Guys,

I’m getting a “C:\Python26\python.exe: can’t open file 'Particle_Blue.py: [Errno2] no such file or directory.” See attached image. I’m not sure if its my end or Krakatoa?

I have been using Maya 2012 SP1 Advance Subscription and Maya 2011 SP1 with simple particle and nParticle setups.

Carl
Error_Python_Message.JPG

Hi Carl,

A couple of questions:
*Is the screenshot the result from our exporter calling the BAT file it generated?
*Did you save the Maya scene before launching the exporter? The exporter depends on the scene to be saved to determine the correct output location for the PY file.

Hi Bobo

Both, ojbExport.mll & PRTTranslator is auto load in the plugin manager “See attached”. Scene is saved to disk and exported via Krakatoa SR exporter button. The screenshot is the result of the bat file being generated.

I can render the Python File through cmd.

Also for Maya 2012. I have installed the PRTTranslator.mll from code.google.com/p/m2k/downloads/list file: m2k-win-2012-vc9-x64.7z Is this the right PRT for maya 2012?
Plugin.jpg

What does your .bat file look like?
It should look something like this:

@set PYTHONPATH=[path to krakatoa sr]
@cd “[folder containing your .mb file]/Maya2KSR/SCENE”
[path to python]\python.exe “[your .mb file name]_[frame].py”
@pause

I am unsure what might cause this error. After you save the Maya file, and export the scene, can you show me the contents of the .bat file in the Maya2KSR directory?

Hi Conrad,

Thank you for the reply… The BAT file is missing the set PYTHONPATH

Contents of current bats are;

@cd U:/Training/Krakatoa/Maya/scenes/Maya2KSR/SCENE
C:\Python26\python.exe Particle_Blue_RND_0001.py
@pause

BAT file has been amended with “@set PYTHONPATH=C:/KrakatoaSR” and works in cmd.

How come this line is being missed out from the exporter?

When was the last time you updated the MEL file?

Hi Bobo

Current mel ST exporter is;
KRAKATOA SR EXPORTER
//Started: 2011/09/19
//Edited: 2011/10/26

I haven’t edited any of the MEL yet. Am I using the wrong st exporter? Is there a line to change the python & Krakatoa path?

The BAT is correct now and rendering. I didn’t see the Export setting at the bottom. I’m still getting the original error in my first post.

@set PYTHONPATH=C:/Python26/DLLs
@cd “U:/Training/Krakatoa/Maya/scenes/Maya2KSR/SCENE”
C:\Python26\python.exe “Particle_Blue_RND_Particles_2012_0001.py”
@pause

I had another question. Where do I change start and end frame for the render? Is it “ri.FrameBegin( 1 )” & “ri.FrameEnd()” E.G. rendering frames 1 to 100 would be “ri.FrameBegin( 1 )” & “ri.FrameEnd( 100 )”

We have been updating the MEL script almost daily, go grab the latest one from the Builds forum. It also supports Windows and Linux now. Note the name has changed, so you will have to edit the Shelf script to load the right source.
If it still fails, we will have to look closer.

The export of animation range has not been added to the Exporter yet, but I have it on my list (and some beta testers already modified their scripts to do animation). This is not a feature of the scene format though. The Exporter would create 100 PY files, one for each frame, and the BAT file would launch them all, one by one. If the particles are not changing between frames (e.g. a turntable render where only the camera or the object are moving), you could have a FOR loop inside the PY file that increments the frames and triggers the renderer 100 times, but that won’t be a feature of the Krakatoa SR Exporter MEL script, it is something one could script manually…

Thanks for your patience!

So I think I have everything set up properly. I downloaded and configured:

KrakatoaSR_1_9_90_45809_windows.zip
Maya2KrakatoaSR_MEL_20111121.zip

Have a bat file set up to test the sample_scene.py file. It looks like this:

set PYTHONPATH=Q:\Tools\Krakatoa\bin\KrakatoaSR_1_9_90_45809_windows
cd Q:\Tools\Krakatoa\bin\KrakatoaSR_1_9_90_45809_windows
C:\Python26\python.exe Q:\Tools\Krakatoa\bin\KrakatoaSR_1_9_90_45809_windows\sample_scene.py

I am working with Maya 2012 on Windows 7 64bit with Python 2.6.2 win32. I get the following error when I try to run the bat file:

C:\Users\m>C:\Python26\python.exe Q:\Tools\Krakatoa\bin\KrakatoaSR_1_9_90_45809_windows\sample_scene.py
Traceback (most recent call last):
File “Q:\Tools\Krakatoa\bin\KrakatoaSR_1_9_90_45809_windows\sample_scene.py”, line 5, in
import KrakatoaSR
ImportError: DLL load failed: %1 is not a valid Win32 application.

It looks like the DLL is mismatched to my python. Should I be using a different build?

Yes, we run Python 2.6 64 bit.
We don’t support Python win32.