Page 1 of 1

Rev 119 export errors

PostPosted: Tue Apr 01, 2008 5:27 pm
by D'Lanor
I downloaded the "bleeding edge" PyPRP version. When I tried to export my age there were the following errors.

In alc_DrawClasses.py: 2 indentation errors, lines 1181 and 1187

After I fixed those the export stopped dead at:

Code: Select all
Traceback (most recent call last):
  File "<string>", line 173, in open_file
  File "<string>", line 88, in export_age
  File "D:\Blender\.blender\scripts\alcresmanager.py", line 602, in export_all
    plDrawInterface.Export(self,obj,scnobj,name,SceneNodeRef,isdynamic,softVolumeParser)
  File "D:\Blender\.blender\scripts\alc_DrawClasses.py", line 1552, in _Export
    drawi.data.export_obj(obj,SceneNodeRef,isdynamic,softVolParser)
  File "D:\Blender\.blender\scripts\alc_DrawClasses.py", line 1771, in export_obj
    pmat.data.export_mat(mat,obj)
  File "D:\Blender\.blender\scripts\alc_MatClasses.py", line 564, in export_mat
    self.FromBlenderMat(mat,obj)
  File "D:\Blender\.blender\scripts\alc_MatClasses.py", line 433, in FromBlenderMat
    animlayer.data.FromBlender(obj,mat,mtex,chan)
  File "D:\Blender\.blender\scripts\alc_MatClasses.py", line 2545, in FromBlender
    frame = alc_AnimClasses.hsMatrix44Key()
AttributeError: 'module' object has no attribute 'hsMatrix44Key'

Re: Rev 119 export errors

PostPosted: Tue Apr 01, 2008 5:36 pm
by Robert The Rebuilder
Those two lines you mentioned in alc_DrawClasses.py are in plDrawableSpans.import_mesh() and are not used for export. Was it alc_DrawClasses.py, or another file?

Re: Rev 119 export errors

PostPosted: Tue Apr 01, 2008 5:47 pm
by D'Lanor
Could be. I always delete the pyc files when I update so I guess Blender was rebuilding those for alc_DrawClasses (due to importing this module) when I exported.

Edit: Weird. The second problem fixed itself when I restarted Blender. There is still something fishy about the module imports I suspect.

Re: Rev 119 export errors

PostPosted: Tue Apr 01, 2008 6:22 pm
by Paradox
I did move quite a few of the import statements to the bottom of the file as suggested by a few people on the forum (D'Lanor included if I recall). It's possible that I might have moved one of the wrong ones, but alc_AnimClasses.py has always had some issues of its own.

Re: Rev 119 export errors

PostPosted: Wed Apr 02, 2008 1:58 am
by D'Lanor
No, that was not me. I don't like imports at the end. And apparently it did not solve anything.

What we have learned now is that these errors occur only after a fresh installation. So next time this happens to somebody we can give the workaround to restart Blender and try again.



The indentation errors are fatal and need to be fixed though, if that wasn't done already (I cannot check since I am at work).

Re: Rev 119 export errors

PostPosted: Wed Apr 02, 2008 9:03 am
by belford
Moving the imports to the end was my comment. You may not like it, but in some situations of two-way importing, it's necessary.

(That is, the solution may require it. I'm not saying "blindly move all the imports", because that can cause different troubles. Or just not work, if you don't move the relevant ones.)

The "fresh installation" thing is probably because Python writes a .pyc file the first time it successfully imports a file. So if you import starting at the right point, and it works, you're fine after that. But you still have a bug. Either figure out how to make it work the first time, or get Blender to import the right module first.