Any way to force pyPrp to ignore errors on import?

If you feel like you're up to the challenge of building your own Ages in Blender or 3ds Max, this is the place for you!

Any way to force pyPrp to ignore errors on import?

Postby Chacal » Thu Dec 27, 2007 4:13 pm

I seem to recall you could add a config option or something. I read that once on one of the dozens of age-building related forums. Can't find it again.
I'm importing a Cyan Age and the import stops on an error about plCameraBrain1 not having an "offset" attribute. I don't care about this object so I'd like the pluging to ignore the error. Is there a way to do this, other than commenting out sections of python code?
Chacal


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

Re: Any way to force pyPrp to ignore errors on import?

Postby Robert The Rebuilder » Thu Dec 27, 2007 5:22 pm

I don't think there is a way to force PyPRP to continue after an error, Chacal. This sounds like a bug we need to fix. But to do that, we'll need some more information

  • Which version of the plugin are you using? [You can tell this by looking at uruprp_addbook.py and searching for the __version__ variable]
  • Which age are you importing?
  • What is the error that it produces? [Copy and paste the output into a "code" statement]

If you just need to keep going, you can comment out the following lines in alcprpfile.py:

Code: Select all
            ...
            elif self.type==0x006F:
                self.data=plCameraRegionDetector(self)
            #elif self.type==0x0099:
            #    self.data=plCameraBrain1(self)
            #elif self.type==0x009E:
            #    self.data=plCameraBrain1_Avatar(self)
            #elif self.type==0x009F:
            #    self.data=plCameraBrain1_Fixed(self)
            #elif self.type==0x00C2:
            #    self.data=plCameraBrain1_Circle(self)
            #elif self.type==0x00B3:
            #    self.data=plCameraBrain1_FirstPerson(self)
            elif self.type==0x0111:
                self.data=plHardRegionPlanes(self)
            ...
Can we rebuild it? Yes, we can - here's how.

MOULagain KI# 1299

Myst Movie coming soon - spread the word!
User avatar
Robert The Rebuilder
 
Posts: 1383
Joined: Sat Sep 29, 2007 7:24 am
Location: Virginia, US

Re: Any way to force pyPrp to ignore errors on import?

Postby Chacal » Thu Dec 27, 2007 5:45 pm

Thanks RTR, will do that.

__version__ = "Alcugs PRP exporter 2.44 $Revision: 862 $"

I was trying to import Neighborhood_District_nb01.prp (import single prp).
The error is (copied from the console since it doesn't show in the log):
Code: Select all
[00B3] First Person Camera01_3
Traceback (most recent call last):
  File "<string>", line 135, in open_file
  File "<string>", line 96, in import_prp
  File "<string>", line 81, in import_age
  File "D:\Graph\Blender\.blender\scripts\alcresmanager.py", line 1797, in impor
t_page
    page.import_all()
  File "D:\Graph\Blender\.blender\scripts\alcresmanager.py", line 169, in import
_all
    self.load()
  File "D:\Graph\Blender\.blender\scripts\alcresmanager.py", line 119, in load
    self.prp.read(f)
  File "D:\Graph\Blender\.blender\scripts\alcprpfile.py", line 554, in read
    obj.read(buf)
  File "D:\Graph\Blender\.blender\scripts\alcprpfile.py", line 336, in read
    o.read(buf,offset,size)
  File "D:\Graph\Blender\.blender\scripts\alcprpfile.py", line 245, in read
    self.data.read(buf)
  File "D:\Graph\Blender\.blender\scripts\alc_CamClasses.py", line 784, in read
    plCameraBrain1_Avatar.read(self,stream)
  File "D:\Graph\Blender\.blender\scripts\alc_CamClasses.py", line 742, in read
    self.fOffset.read(stream)
AttributeError: plCameraBrain1_FirstPerson instance has no attribute 'fOffset'
Chacal


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

Re: Any way to force pyPrp to ignore errors on import?

Postby Chacal » Fri Dec 28, 2007 12:57 am

Here,s another import bug. Trying to import Ercana_District_PlantExterior01.prp

Code: Select all
[0067] OccluderVats_Occluder
Traceback (most recent call last):
  File "<string>", line 135, in open_file
  File "<string>", line 96, in import_prp
  File "<string>", line 81, in import_age
  File "D:\Graph\Blender\.blender\scripts\alcresmanager.py", line 1797, in impor
t_page
    page.import_all()
  File "D:\Graph\Blender\.blender\scripts\alcresmanager.py", line 169, in import
_all
    self.load()
  File "D:\Graph\Blender\.blender\scripts\alcresmanager.py", line 119, in load
    self.prp.read(f)
  File "D:\Graph\Blender\.blender\scripts\alcprpfile.py", line 554, in read
    obj.read(buf)
  File "D:\Graph\Blender\.blender\scripts\alcprpfile.py", line 335, in read
    o = PrpObject(self,self.type)
  File "D:\Graph\Blender\.blender\scripts\alcprpfile.py", line 157, in __init__
    self.data=plObjectInVolumeAndFacingDetector(self)
  File "D:\Graph\Blender\.blender\scripts\alc_Classes.py", line 3044, in __init_
_
    plObjectInVolumeDetector.__init__(self,parent,name,0x00E7)
TypeError: __init__() takes at most 3 arguments (4 given)
Chacal


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

Re: Any way to force pyPrp to ignore errors on import?

Postby Robert The Rebuilder » Fri Dec 28, 2007 7:14 am

I see that you're on the latest plug-in release, which is undergoing some revamps and fixes.

If you try using the stable release, you can import those PRP files without errors. Here's the link to the stable release:

http://ulm.hbyte.net/PyPRP/PyPRP-stable-0.5.zip
Can we rebuild it? Yes, we can - here's how.

MOULagain KI# 1299

Myst Movie coming soon - spread the word!
User avatar
Robert The Rebuilder
 
Posts: 1383
Joined: Sat Sep 29, 2007 7:24 am
Location: Virginia, US

Re: Any way to force pyPrp to ignore errors on import?

Postby Chacal » Fri Dec 28, 2007 10:45 am

Thanks, I'll try that.
I'm not ready to create new Ages using advanced features yet anyway, I'm just analysing Cyan Ages.
Chacal


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

Re: Any way to force pyPrp to ignore errors on import?

Postby Kierra » Sat Dec 29, 2007 12:37 am

Not to be a stickler, but shouldn't this be in the Programmers section? :)

~Kia
User avatar
Kierra
 
Posts: 371
Joined: Sat Sep 29, 2007 12:05 am
Location: 311 miles West of Cyan. roughly.

Re: Any way to force pyPrp to ignore errors on import?

Postby Chacal » Sat Dec 29, 2007 1:52 am

Nope. It's about PyPRP.
Chacal


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

Re: Any way to force pyPrp to ignore errors on import?

Postby Nek'rahm » Fri Jan 04, 2008 5:30 pm

Wish I could help...


But I can't...


So I phail...


>_<
Nek'rahm
 
Posts: 461
Joined: Mon Nov 19, 2007 2:53 pm


Return to Building

Who is online

Users browsing this forum: No registered users and 0 guests