Tangomajom / blender2ogre

Automatically exported from code.google.com/p/blender2ogre
GNU Lesser General Public License v2.1
0 stars 0 forks source link

subprocess.call() raises exception #50

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. create a simple scene with a single cube in blender 2.6
2. export to OGRE
3.

What is the expected output? What do you see instead?

This is the error message I see:

--------------------------------------------------------------------------------
ogre export-> /home/yxn/src/game/a.scene
saved /home/yxn/src/game/Material.material
--------------- exporting root -> <bpy_struct, Object("Cube")>
mesh to Ogre mesh XML format Cube
creating document...
    writing shared geometry
 time:  0.00415802001953125
    writing submeshes
[Ogre Tools Wrapper] /home/yxn/src/game/Cube.mesh.xml
--------------------------------------------------------------------------------
/usr/local/bin/OgreXMLConverter -log _ogre_debug.txt  -e
________________________________________________________________________________
Traceback (most recent call last):
  File "/home/yxn/.blender/2.62/scripts/addons/io_export_ogreDotScene.py", line 2814, in execute
    def execute(self, context): self.ogre_export(  self.filepath, context ); return {'FINISHED'}
  File "/home/yxn/.blender/2.62/scripts/addons/io_export_ogreDotScene.py", line 3091, in ogre_export
    xmlparent=doc._scene_nodes 
  File "/home/yxn/.blender/2.62/scripts/addons/io_export_ogreDotScene.py", line 3238, in _node_export
    self.dot_mesh( ob, os.path.split(url)[0] )
  File "/home/yxn/.blender/2.62/scripts/addons/io_export_ogreDotScene.py", line 2909, in dot_mesh
    dot_mesh( ob, path, force_name, ignore_shape_animation=False )
  File "/home/yxn/.blender/2.62/scripts/addons/io_export_ogreDotScene.py", line 4657, in dot_mesh
    OgreXMLConverter( xmlfile, has_uvs=dotextures )
  File "/home/yxn/.blender/2.62/scripts/addons/io_export_ogreDotScene.py", line 3653, in OgreXMLConverter
    subprocess.call(cmd)
  File "/home/yxn/src/game/blender-2.62-linux-glibc27-i686/2.62/python/lib/python3.2/subprocess.py", line 467, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/home/yxn/src/game/blender-2.62-linux-glibc27-i686/2.62/python/lib/python3.2/subprocess.py", line 741, in __init__
    restore_signals, start_new_session)
  File "/home/yxn/src/game/blender-2.62-linux-glibc27-i686/2.62/python/lib/python3.2/subprocess.py", line 1356, in _execute_child
    raise child_exception_type(errno_num, err_msg)
OSError: [Errno 9] Bad file descriptor

location:<unknown location>:-1

location:<unknown location>:-1

What version of the product are you using? On what operating system?

The one from the HG repository. Fedora Linux 16.

Please provide any additional information below.

The blender2ogre script calls subprocess.call(cmd) with these arguments: 
['/usr/local/bin/OgreXMLConverter', '-log', '_ogre_debug.txt', '-e', 
'/home/yxn/src/game/Cube.mesh.xml'], I have verified that the following python 
script works fine with python 3.2.1. Though blender2.6 is using python3.2.2:

import os
import subprocess
import io

subprocess.call(['/usr/local/bin/OgreXMLConverter', '-log', '_ogre_debug.txt',
'-e', '/home/yxn/src/game/Cube.mesh.xml'])

Original issue reported on code.google.com by yuxiangn...@gmail.com on 16 Apr 2012 at 7:03

GoogleCodeExporter commented 8 years ago
looks like subprocess.call has changed in py3.2.2.
this needs to be fixed.

Original comment by goatman.py@gmail.com on 19 Apr 2012 at 5:40

GoogleCodeExporter commented 8 years ago
Can you verify if this happens if you pull the latest HG code?

Original comment by jo...@adminotech.com on 10 Sep 2012 at 12:02