Bug with 1.3.0

Announcements and discussion regarding any projects related to Cyan Worlds' Plasma Engine including (but not limited to) CyanWorlds.com Engine, Drizzle, OfflineKI, PyPRP, and libHSPlasma.

Bug with 1.3.0

Postby Chacal » Sun Mar 02, 2008 1:53 pm

While trying to import any Cyan prp.

Code: Select all
Traceback (most recent call last):
  File "<string>", line 150, in open_file
  File "<string>", line 111, in import_prp
  File "<string>", line 93, in import_age
  File "D:\Graph\Blender\.blender\scripts\alcresmanager.py", line 908, in import_page
    page.import_all()
  File "D:\Graph\Blender\.blender\scripts\alcresmanager.py", line 195, in import_all
    self.load()
  File "D:\Graph\Blender\.blender\scripts\alcresmanager.py", line 126, in load
    self.prp.read(f)
  File "D:\Graph\Blender\.blender\scripts\alcprpfile.py", line 583, in read
    obj.read(buf)
  File "D:\Graph\Blender\.blender\scripts\alcprpfile.py", line 381, in read
    o.read(buf,offset,size)
  File "D:\Graph\Blender\.blender\scripts\alcprpfile.py", line 290, in read
    self.data.read(buf)
  File "D:\Graph\Blender\.blender\scripts\alc_MatClasses.py", line 2494, in read

    plLayerAnimationBase.read(self, stream)
  File "D:\Graph\Blender\.blender\scripts\alc_MatClasses.py", line 2458, in read

    self.fPreshadeColorCtl = PrpController(stream.Read16(), self.getVersion())
NameError: global name 'PrpController' is not defined
Chacal


"The weak can never forgive. Forgiveness is an attribute of the strong."
-- Mahatma Gandhi
User avatar
Chacal
 
Posts: 2417
Joined: Tue Nov 06, 2007 2:45 pm
Location: Quebec, Canada

Re: Bug with 1.3.0

Postby Paradox » Sun Mar 02, 2008 2:12 pm

D'oh! I wish I knew what was causing the extra issue with anim class import, but it should be fixed now. Download Latest.zip again and let me know if it works.

http://www.guildofwriters.com/pyprp/latest.zip
"And one day I woke to find the future held no place for me. I was unwanted in a world, that with my hands I'd helped to build. Where once was honesty and pride, I now stand broken and alone."
User avatar
Paradox
 
Posts: 1259
Joined: Fri Sep 28, 2007 6:48 pm
Location: Canada

Re: Bug with 1.3.0

Postby D'Lanor » Sun Mar 02, 2008 2:13 pm

That is strange. Since alc_AnimClasses is imported with...

Code: Select all
from alc_AnimClasses import *


...it does not need to be prefixed with the name of the module.

Is alc_AnimClasses.py in your scripts folder?
"It is in self-limitation that a master first shows himself." - Goethe
User avatar
D'Lanor
 
Posts: 1980
Joined: Sat Sep 29, 2007 4:24 am

Re: Bug with 1.3.0

Postby Paradox » Sun Mar 02, 2008 2:25 pm

yes, I've had the same problem multiple times when testing the export. The file is clearly there, and I have no idea why it's causing the random errors :(
"And one day I woke to find the future held no place for me. I was unwanted in a world, that with my hands I'd helped to build. Where once was honesty and pride, I now stand broken and alone."
User avatar
Paradox
 
Posts: 1259
Joined: Fri Sep 28, 2007 6:48 pm
Location: Canada

Re: Bug with 1.3.0

Postby belford » Sun Mar 02, 2008 7:15 pm

Is this a situation where two modules are trying to "import" each other? That's usually what's going on when I see mysterious import problems.
belford
 
Posts: 344
Joined: Sat Sep 29, 2007 7:18 pm

Re: Bug with 1.3.0

Postby Chacal » Sun Mar 02, 2008 9:38 pm

Paradox wrote:D'oh! I wish I knew what was causing the extra issue with anim class import, but it should be fixed now. Download Latest.zip again and let me know if it works.

http://www.guildofwriters.com/pyprp/latest.zip


Slightly different error now:

Code: Select all
[Type: 0x122]
[Type: 0x43]
Traceback (most recent call last):
  File "<string>", line 150, in open_file
  File "<string>", line 111, in import_prp
  File "<string>", line 93, in import_age
  File "D:\Graph\Blender\.blender\scripts\alcresmanager.py", line 908, in import_page
    page.import_all()
  File "D:\Graph\Blender\.blender\scripts\alcresmanager.py", line 195, in import_all
    self.load()
  File "D:\Graph\Blender\.blender\scripts\alcresmanager.py", line 126, in load
    self.prp.read(f)
  File "D:\Graph\Blender\.blender\scripts\alcprpfile.py", line 583, in read
    obj.read(buf)
  File "D:\Graph\Blender\.blender\scripts\alcprpfile.py", line 381, in read
    o.read(buf,offset,size)
  File "D:\Graph\Blender\.blender\scripts\alcprpfile.py", line 290, in read
    self.data.read(buf)
  File "D:\Graph\Blender\.blender\scripts\alc_MatClasses.py", line 2495, in read

    self.fTimeConvert.read(stream)
AttributeError: 'NoneType' object has no attribute 'read'
Chacal


"The weak can never forgive. Forgiveness is an attribute of the strong."
-- Mahatma Gandhi
User avatar
Chacal
 
Posts: 2417
Joined: Tue Nov 06, 2007 2:45 pm
Location: Quebec, Canada

Re: Bug with 1.3.0

Postby D'Lanor » Mon Mar 03, 2008 11:44 am

belford wrote:Is this a situation where two modules are trying to "import" each other? That's usually what's going on when I see mysterious import problems.

Yes, alc_MatClasses and alc_AnimClasses are importing each other.

And alc_MatClasses is importing alc_AnimClasses in two different ways. I guess this needs some code cleaning.
"It is in self-limitation that a master first shows himself." - Goethe
User avatar
D'Lanor
 
Posts: 1980
Joined: Sat Sep 29, 2007 4:24 am

Re: Bug with 1.3.0

Postby D'Lanor » Mon Mar 03, 2008 4:56 pm

What the heek? Now PyPRP suddenly generates bad sum files... :o
"It is in self-limitation that a master first shows himself." - Goethe
User avatar
D'Lanor
 
Posts: 1980
Joined: Sat Sep 29, 2007 4:24 am

Re: Bug with 1.3.0

Postby belford » Mon Mar 03, 2008 10:51 pm

Yeah, you really want to import the minimum necessary in any given file.

It also helps a lot to move import statements to the *end* of the file, where possible. It's not always possible; if you're declaring some "class X(Y):" then Y has to be imported up top. But if you only use a symbol inside a function (or method), then its import statement can be at the bottom of the file. And that avoids a lot of the trouble.

(Mutual imports aren't illegal; you just have to be careful.)
belford
 
Posts: 344
Joined: Sat Sep 29, 2007 7:18 pm


Return to Plasma Development

Who is online

Users browsing this forum: No registered users and 4 guests

cron