Tutorial 1, problem


10-05-2007 16:42:12

The line code at Tutorial 1:

from pyogre import ogre

Here show that error:

from pyogre import ogre
ImportError: No module named pyogre

Then, I´m using simple "import ogre"
And I can pass at the enterpreter, but if i use some funtions like:


When the screen is charging, that close, with that error:

File "C:/Python25/Ogre/demos/testes/teste.pyw", line 14, in _createScene
AttributeError: 'module' object has no attribute 'Degree'
Unregistering ResourceManager for type BspLevel

Please, someone has a solution?
Thx anyone for help


10-05-2007 17:39:40

make sure you are using the latest python-ogre, then change the import statement to:

import ogre.renderer.OGRE as ogre

after that, you will be able to use ogre.Degree, ogre.Quaternion etc.

the wiki tutorials are out of date, try looking at the python-ogre demos for better information.


10-05-2007 17:47:33

Yeah the whole python portion of the official Ogre wiki needs to be revamped once 1.0 is released to reflect all the changes that Python-Ogre brings.


10-05-2007 21:07:32

Thx bharling, that import solve the problem! And I will see the tutorial with the demos.


10-05-2007 23:49:29

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

class TutorialApplication(SampleFramework.Application):
def _createScene(self):

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

ive tried this code modded from the 1 tutorial of pyogre but i get this error:

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 *
Traceback (most recent call last):
File "esempio.py", line 4, in <module>
class TutorialApplication(SampleFramework.Application):
NameError: name 'SampleFramework' is not defined

but it's in the same directory of smoke ogre demo and i think there is sampleframework


11-05-2007 09:30:17

You really should start with demo_smoke, or demo_skyxxx and work from those... That way you have a working model that you can then use to play with the Ogre features...

The problem you have is with :
class TutorialApplication(SampleFramework.Application):
it should read:
class TutorialApplication(sf.Application):