', line 37 in ? File "c;\Pythin23\DTSPython\_init_.py"> Python Script Error | Artist Corner | Forums | Community | GarageGames.com

Game Development Community

Python Script Error

by Johnathon Morgan · in Artist Corner · 03/04/2005 (4:34 pm) · 10 replies

Alright I am having another problem exporting files. I keep getting python script error: check console when I export and this is what it says:
Traceback (most recent call last):
File "', line 37 in ?
File "c;\Pythin23\DTSPython\_init_.py", line 31, in ?
from Dts_stream import *
File "C:\Python23\DTSPython\Dts_stream.py", line 32, in ?
from Dts_Shape import IF1Material, DObject, DetailLevel, subshape, Node,
Trigger, ObjectSTate, Decal, DecalState
ImportError: No module named warnings


Any Ideas?

About the author

Recent Threads

  • Crashes on export

  • #1
    03/13/2005 (3:04 am)
    Johnathon,

    Looks like your installation of python is in some way impaired; Make sure your PYTHONPATH environment variable includes all of your python installation's module directory's, and also of course the directory in which the exporter is kept.

    If all else fails, try reinstalling python.
    #2
    03/18/2005 (3:22 am)
    Thanks I had to reinstall a few times but it works fine now.
    #3
    04/19/2005 (10:39 pm)
    I have a similar problem

    I have blender 2.36, python 2.4.1 and the latest DTS exporter. I have also tried to reinstall Python

    My PYTHONPATH is
    SET PYTHONPATH=C:\PYTHON24;C:\PYTHON24\DLLS;C:\PYTHON24\LIB;C:\PYTHON24\LIB\LIB-TK;C:\Program Files\Blender Foundation\Blender\.blender\scripts;C:\Program Files\Blender Foundation\Blender\.blender\scripts\DTSPython;C:\Program Files\Blender Foundation\Blender\.blender\scripts\util

    When exporting the example.blend I get in the Console:

    'import site' failed; use -v for traceback
    Traceback (most recent call last):
    File "", line 37, in ?
    File "C:\Program Files\Blender Foundation\Blender\.blender\scripts\DTSPython\_
    _init__.py", line 30, in ?
    from Torque_Util import *
    File "C:\Program Files\Blender Foundation\Blender\.blender\scripts\DTSPython\T
    orque_Util.py", line 26, in ?
    import struct, array, math, string
    File "C:\PYTHON24\LIB\string.py", line 83, in ?
    import re as _re
    File "C:\PYTHON24\LIB\re.py", line 5, in ?
    from sre import *
    File "C:\PYTHON24\LIB\sre.py", line 97, in ?
    import sre_compile
    File "C:\PYTHON24\LIB\sre_compile.py", line 13, in ?
    import _sre, sys
    ImportError: No module named _sre


    Any ideas?
    #4
    04/19/2005 (11:27 pm)
    OK, found the answer: You can't use Python 2.4, you MUST use 2.3 (I tried 2.3.5)
    /Thomas
    #5
    09/27/2005 (1:10 pm)
    Is this still the case, that the exporter is not compatible with Python 2.4?

    Thanks,

    Michael Rogers
    #6
    09/29/2005 (2:30 pm)
    Yes I think this is the current state of affairs, but you can run two (or more) versions on Python on your system, just be careful with any PYTHONPATH environment variables.
    #7
    10/30/2005 (12:41 pm)
    I also have trouble getting the DTS exporter working. I'm using Blender 2.37a for Windows (XP) and Python 2.3. The Torque Shape (.dts)... export option shows up, however choosing Export or Configure yields ERROR: Python script error. The console consistently says:
    ImportError: No module named DTSPython
    However the DTSPython module is located in my .blender\scripts\Torque_Exporter folder. I set my PYTHONPATH variable as such:
    SET PYTHONPATH=C:\PYTHON23;C:\PYTHON23\DLLS;C:\PYTHON23\LIB;C:\PYTHON23\LIB\LIB-TK;C:\blender-2.37a-windows\.blender\scripts;C:\blender-2.37a-windows\.blender\scripts\Torque_Exporter\DTSPython;C:\blender-2.37a-windows\.blender\scripts\Torque_Exporter\util
    And I've verified those are all valid paths. Does anyone know why this still isn't working?
    #8
    11/01/2005 (5:25 pm)
    The DTSPython module needs to be in the right place in your blender folders. It should be under your scripts folder
    #9
    11/06/2005 (2:56 pm)
    The exporter is working now. I had to install Blender 2.34 for compatibility, and move the scripts out of the Torque_Exporter subfolder, directly into the scripts folder.
    Now hopefully I can learn enough about Blender to use my own shapes to replace the cube in example.blend.
    #10
    11/06/2005 (8:53 pm)
    Of course you needn't replace it straight away, even changing the cube and then exporting it can be a great way to learn, or start with example.blend and make your own shape next to the cube then delete the cube, make you object the child and export.

    Baby steps can be fun too! :)