can't locate the 'plugins.cfg' file

Eternius

07-05-2007 03:20:52

I just installed Python-Ogre with some trouble (at first rinning build claimed that the package directory isn't there, but then this error magically disappeared at some point), but none of the examples run, and all throw the same error: can't locate the 'plugins.cfg' file. The complete output is attached.
Any suggestions?
Edit: and yes, there is a plugins.cfg sitting in the directory

c:\Python25\PythonOgreRelease>C:\Python25\PythonOgreRelease\demos\ogre\Demo_EnvM
ap.py
C:\Python25\lib\site-packages\ogre\renderer\OGRE\__init__.py:6: RuntimeWarning:
to-Python converter for struct std::pair<class std::basic_string<char,struct std
::char_traits<char>,class std::allocator<char> > const ,class std::basic_string<
char,struct std::char_traits<char>,class std::allocator<char> > > already regist
ered; second conversion method ignored.
from _ogre_ import *
C:\Python25\lib\site-packages\ogre\io\OIS\__init__.py:1: RuntimeWarning: to-Pyth
on converter for class std::multimap<class std::basic_string<char,struct std::ch
ar_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> >,struct std::less<class std:
:basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,
class std::allocator<struct std::pair<class std::basic_string<char,struct std::c
har_traits<char>,class std::allocator<char> > const ,class std::basic_string<cha
r,struct std::char_traits<char>,class std::allocator<char> > > > > already regis
tered; second conversion method ignored.
from _ois_ import *
C:\Python25\lib\site-packages\ogre\io\OIS\__init__.py:1: RuntimeWarning: to-Pyth
on converter for struct std::pair<class std::basic_string<char,struct std::char_
traits<char>,class std::allocator<char> > const ,class std::basic_string<char,st
ruct std::char_traits<char>,class std::allocator<char> > > already registered; s
econd conversion method ignored.
from _ois_ import *

** Warning: Unable to locate a suitable plugins.cfg file.
** Warning: Please check your ogre installation and copy a
** Warning: working plugins.cfg file to the current directory.

Traceback (most recent call last):
File "C:\Python25\PythonOgreRelease\demos\ogre\Demo_EnvMap.py", line 33, in <m
odule>
application.go()
File "C:\Python25\lib\site-packages\ogre\renderer\OGRE\sf_OIS.py", line 60, in
go
if not self._setUp():
File "C:\Python25\lib\site-packages\ogre\renderer\OGRE\sf_OIS.py", line 70, in
_setUp
self.root = ogre.Root(getPluginPath())
File "C:\Python25\lib\site-packages\ogre\renderer\OGRE\sf_OIS.py", line 34, in
getPluginPath
raise ogre.Exception(0, "can't locate the 'plugins.cfg' file", "")
AttributeError: 'module' object has no attribute 'Exception'

c:\Python25\PythonOgreRelease>C:\Python25\PythonOgreRelease\demos\ogre\Demo_EnvM
ap.py

andy

07-05-2007 07:36:03

You need to change into the same directory as the demo, and run it from there...

It looks for the plugin directory in the current working dir, which in your case is /python25/pythonogre....

If you get a moment perhaps you could add a trouble ticket to http://www.python-ogre.org as we should probably enhance the framework to look in the script directory first..

Cheers

Andy

Eternius

07-05-2007 08:01:24

Just posting to say that things work. And started working with no apparent changes on my side. Running the py scripts directly threw that error, command line threw the same error, but as you said the working dir wasn't set. However now running the py scripts directly works just fine. Bizzare, but thanks =)