[x3d-public] X3DPSAIL error

Brutzman, Donald (Don) (CIV) brutzman at nps.edu
Thu May 9 07:58:29 PDT 2019

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 --------------
A non-text attachment was scrubbed...
Name: CircleFishPrototype.x3d
Type: model/x3d+xml
Size: 8317 bytes
Desc: CircleFishPrototype.x3d
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20190509/6ac6030d/attachment-0001.x3d>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CircleFishPrototype.java
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20190509/6ac6030d/attachment-0002.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CircleFishPrototype.py
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20190509/6ac6030d/attachment-0003.ksh>

More information about the x3d-public mailing list