[x3d-public] X3DPSAIL error

John Carlson yottzumm at gmail.com
Thu May 9 17:55:48 PDT 2019

What I believe this means is that the addChild is not found on an abstract class (not the TransformObject concrete class which is NOT shown below, but it looks like what’s returned from setRotation, X3DConcreteNode, which I believe TransformObject inherits from, but please check).  It’s basically the same error as we saw before with interfaces, but now rearing it’s head on abstract classes.  So look what addChild is called on, and we can try to cast or wrap like we did for SF and MF fields.

So basically, we would have to wrap each set call in a cast or wrap.

That’s my best suggestion on fixing without modifying or extending pyjnius.


Sent from Mail for Windows 10

From: Brutzman, Donald (Don) (CIV)
Sent: Thursday, May 9, 2019 9:58 AM
To: John Carlson
Cc: X3D Graphics public mailing list
Subject: Re: X3DPSAIL error

Not seeing what is wrong here.  Original X3D excerpt:

     <Transform rotation='1 0 0 1.395'>
	<Transform DEF='FishTransform'>
         	<connect nodeField='scale' protoField='fishScale'/>

The java version works, compiling and running OK.  Excerpt:

     .addChild(new TransformObject().setRotation(1.0f,0.0f,0.0f,1.395f)
       .addChild(new TransformObject("FishTransform")
         .setIS(new ISObject()
           .addConnect(new connectObject().setNodeField("scale").setProtoField("fishScale")))

The python version looks like:

         .addChild(Transform() \
          .setDEF(SFString("FishTransform")) \
          .setIS(IS() \
           .addConnect(connect() \
            .setNodeField(SFString("scale")) \
            .setProtoField(SFString("fishScale")) \
           ) \

I get the same error as you - but I don't see what is wrong here either.

Of note is that Python source is interpreted, i.e. compiled and run one line at a time... a common error mode for interpreted languages is that they misinterpret and provide misdirection regarding where an error actually occurs.

Possibly the error occurs before or after this block; still not seeing it though.  You might try cutting out lines of original .x3d model piecemeal in an attempt to isolate the actual cause further. "Moving an error around" is a good debug strategy.

Current versions attached - good night + good luck!

On 5/8/2019 8:26 PM, John Carlson wrote:
> processSingleScene.pythonValidation:
>       [echo] processSingleScene.python C:\x3d-code\www.web3d.org\x3d\content\examples\X3dForWebAuthors\Chapter05AppearanceMaterialTextures\CircleFishPrototype.future.py
>       [echo] Loading X3D model as .py program, if successful then saving as round-trip .x3d version:
>       [exec] Traceback (most recent call last):
>       [exec]   File "C:\x3d-code\www.web3d.org\x3d\content\examples\X3dForWebAuthors\Chapter05AppearanceMaterialTextures\CircleFishPrototype.future.py", line 92, in <module>
>       [exec]     .addConnect(connect().setNodeField(SFString("scale")).setProtoField(SFString("fishScale")) \
>       [exec] AttributeError: 'org.web3d.x3d.jsail.X3DConcreteNode' object has no attribute 'addChild'
>       [exec] Result: 1
>       [echo] =====================
all the best, Don
Don Brutzman  Naval Postgraduate School, Code USW/Br       brutzman at nps.edu
Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149
X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20190509/4d26e606/attachment.html>

More information about the x3d-public mailing list