Help with wiki tutorial 1


12-10-2008 17:48:17

I'm having trouble with my very first program in PythonOgre. Here's what happened:

I installed the pre-compiled version of PythonOgre.
I should already have OpenGL installed (I've used it in programs before), but I had to install the latest version of DirectX (DXSDK_Aug08.exe) before any of the demos worked. Now it seems that every demo works perfectly. In the "OGRE Engine Rendering Setup" that appears every time I run a demo, it doesn't matter whether I use the OpenGL or DirectX renderers.

I went to and copied the following code:

import ogre.renderer.OGRE as ogre
import SampleFramework as sf

class TutorialApplication(sf.Application):

def _createScene(self):

if __name__ == '__main__':
ta = TutorialApplication()

I saved it as C:\PythonOgre\demos\ The wiki tutorial says I need three files: In the same folder were the required files plugins.cfg and resources.cfg, BUT THERE IS NO FILE MEDIA.CFG ANYWHERE ON MY COMPUTER.

When I run out of IDLE I get the following error:

Traceback (most recent call last):
File "C:\PythonOgre\demos\", line 11, in <module>
File "C:\Python25\lib\site-packages\ogre\renderer\OGRE\", line 66, in go
if not self._setUp():
File "C:\Python25\lib\site-packages\ogre\renderer\OGRE\", line 90, in _setUp
self.root = ogre.Root(getPluginPath())
OgreInternalErrorException: OGRE EXCEPTION(7:): Could not load dynamic library ../../plugins\RenderSystem_GL.dll. System Error: The specified module could not be found.

in DynLib::load at ..\src\OgreDynLib.cpp (line 80)

I don't even know where to begin fixing this problem. Again, this is my first PythonOgre program so I don't know what any of the code means yet (although I know a bit about Python). This problem still occurs even if in the last demo I ran, I chose to use DirectX and not OpenGL. There exists a file C:\PythonOgre\plugins\RenderSystem_GL.dll.

It now works when I reinstalled both Python and PythonOgre, put my program inside the folder C:\PythonOgre\demos\OgreNewt, and copied the file into that folder as well. Phew!


13-10-2008 12:53:56

Your issue in to do with plugins.cfg -- if you have a look at that you can see that the path to the plugins (includes directx, opengl, etc) is hardcoded..

Based upon the initial test directory (/PythonOgre/demos) you would have had to edit these to point one level up...

I am considering changing the overall build to put the plugins into the module directory and do away with a plugins.cfg for the sampleframework, or at least to try and resolve these types of issues..



17-06-2009 13:55:00

I had this same trouble as well. Another way to fix it is to copy all the .cfg 's and sampleframework into a new folder for you to work in.

As an aside, how is the plugin.cfg (the one in OgreSDK, right?) supposed to look?