<div dir="ltr">I could definitely patch this in x3djsonld.py, but perhaps just better use of features in x3d.py would be indicated. There's already quite a bit of use of x3d.py in x3djsonld.py.<div><br></div><div>Somehow, I think I need to override SFString with MFVec3f, etc., but I'm not sure where to do it.</div><div><br></div><div>This will take some thought as to the best approach, and it's time for coffee!</div><div><br></div><div>Woohoo!</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jun 13, 2022 at 7:59 AM John Carlson <<a href="mailto:yottzumm@gmail.com">yottzumm@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">This temporary patch, just for MFVec3f fields, fixed the arc4.py output from x3djsonld.py.<div><br></div><div>More research is needed for broader issues and figure out if an x3djsonld.py or x3d.py would be better.</div><div><br></div><div>$ git diff x3djsonld.py<br>diff --git a/src/main/python/x3djsonld.py b/src/main/python/x3djsonld.py<br>index ac2b7eacf..9d6bfc665 100644<br>--- a/src/main/python/x3djsonld.py<br>+++ b/src/main/python/x3djsonld.py<br>@@ -44,6 +44,8 @@ def parseArray(lead, trail, grandparent, parent, data, indent, fieldType=None):<br>     if fieldType is None:<br>         fieldType = fieldInfo["fieldType"]<br>     tupleSize = fieldInfo["tupleSize"]<br>+    if fieldType == "MFVec3f":<br>+        tupleSize = 3<br>     #if tupleSize > 1:<br>     #    print("'''"+str(fieldType)+" "+grandparent+"."+parent+"["+str(tupleSize)+"]'''", file=sys.stderr)<br>     for d in data:<br></div><div><br></div><div>Explanations as to why the patch is needed is welcome.  Vince?</div><div><br></div><div>Unpatched code is here:</div><div><br></div><div><a href="https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/python/x3djsonld.py" target="_blank">X3DJSONLD/x3djsonld.py at master · coderextreme/X3DJSONLD (github.com)</a><br></div><div><br></div><div>Data file passed as an argument is here:</div><div><br></div><div><a href="https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/data/arc4.json" target="_blank">X3DJSONLD/arc4.json at master · coderextreme/X3DJSONLD (github.com)</a><br></div><div><br></div><div>Is it because the value field originally has type SFString?</div><div><br></div><div>From field statement .value in X3DUOM:</div><div><br></div><div>            <field name="value"<br>                    type="SFString"<br>                    accessType="inputOutput"<br>                    description="Provide default initialization value for this field variable (which may be re-initialized later by instantiation value of a named ProtoInstance fieldValue)."/><br>            <ContentModel><br></div><div><br></div><div>Also, /class field/ in x3d.py has no TUPLE_SIZE method, and value field is</div><div>        ('value', '', FieldType.SFString, AccessType.inputOutput, 'field'),<br></div><div><br></div><div>confirming the X3DUOM.</div><div><br></div><div>It looks like I need some metamojo in x3djsonld.py</div><div><br></div><div>Help!</div><div><br></div><div>John</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jun 13, 2022 at 7:24 AM John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>This patch fixed it, problem is in x3djsonld.py (not x3d.py that I know of).</div><div><br></div><div>diff --git a/src/main/python/net/coderextreme/data/arc4.py b/src/main/python/net/coderextreme/data/arc4.py<br>index bdb08b22b..c7e330572 100644<br>--- a/src/main/python/net/coderextreme/data/arc4.py<br>+++ b/src/main/python/net/coderextreme/data/arc4.py<br>@@ -21,7 +21,7 @@ PositionInterpolator(DEF="DECLpoint_G1_PI1", key=[float(0),float(1)], keyValue=[<br> Script(DEF="DECLpoint_G1_MB1", field=[field(name="translation", accessType="inputOutput", type="SFVec3f", value=(0,0,0)),<br> field(name="old", accessType="inputOutput", type="SFVec3f", value=(0,0,0)),<br> field(name="set_location", accessType="inputOnly", type="SFTime"),<br>-field(name="keyValue", accessType="inputOutput", type="MFVec3f", value=[0,0,0,0,5,0])<br>+field(name="keyValue", accessType="inputOutput", type="MFVec3f", value=[(0,0,0),(0,5,0)])<br> ],<br> #['', 'ecmascript:', '\t\tfunction set_location(value) {', '                    old = translation;', '\t\t    translation = new SFVec3f(Math.random()*10-5, Math.random()*10-5, Math.random()*10-5);', '                    keyValue = new MFVec3f([old, translation]);', '\t\t    // Browser.println(keyValue);', '\t\t}', '', '', '']<br> ),<br>@@ -42,7 +42,7 @@ PositionInterpolator(DEF="DECLpoint_G2_PI1", key=[float(0),float(1)], keyValue=[<br> Script(DEF="DECLpoint_G2_MB1", field=[field(name="translation", accessType="inputOutput", type="SFVec3f", value=(0,0,0)),<br> field(name="old", accessType="inputOutput", type="SFVec3f", value=(0,0,0)),<br> field(name="set_location", accessType="inputOnly", type="SFTime"),<br>-field(name="keyValue", accessType="inputOutput", type="MFVec3f", value=[0,0,0,0,5,0])<br>+field(name="keyValue", accessType="inputOutput", type="MFVec3f", value=[(0,0,0),(0,5,0)])<br> ],<br> #['', 'ecmascript:', '\t\tfunction set_location(value) {', '                    old = translation;', '\t\t    translation = new SFVec3f(Math.random()*10-5, Math.random()*10-5, Math.random()*10-5);', '                    keyValue = new MFVec3f([old, translation]);', '\t\t    // Browser.println(keyValue);', '\t\t}', '', '', '']<br> ),<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jun 13, 2022 at 7:19 AM John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Follow-on report, I will look into arc4.py<div><br></div><div>python ../python/x3djsonld.py ../data/arc4.json ../python/net/coderextreme/data/arc4.py<br>Traceback (most recent call last):<br>  File "C:\Users\john\X3DJSONLD\src\main\python\x3d.py", line 4961, in assertValidMFVec3f<br>    MFVec3f(value)<br>  File "C:\Users\john\X3DJSONLD\src\main\python\x3d.py", line 9559, in __init__<br>    self.value = value<br>  File "C:\Users\john\X3DJSONLD\src\main\python\x3d.py", line 9581, in value<br>    value = [(x, y, z) for x, y, z in value]<br>  File "C:\Users\john\X3DJSONLD\src\main\python\x3d.py", line 9581, in <listcomp><br>    value = [(x, y, z) for x, y, z in value]<br>TypeError: cannot unpack non-iterable int object<br><br>The above exception was the direct cause of the following exception:<br><br>Traceback (most recent call last):<br>  File "C:\Users\john\X3DJSONLD\src\main\python\net\coderextreme\data\arc4.py", line 24, in <module><br>    field(name="keyValue", accessType="inputOutput", type="MFVec3f", value=[0,0,0,0,5,0])<br>  File "C:\Users\john\X3DJSONLD\src\main\python\x3d.py", line 12272, in __init__<br>    self.value = value<br>  File "C:\Users\john\X3DJSONLD\src\main\python\x3d.py", line 12342, in value<br>    assertValidFieldInitializationValue(<a href="http://self.name" target="_blank">self.name</a>, self.type, value, parent='field/@value')<br>  File "C:\Users\john\X3DJSONLD\src\main\python\x3d.py", line 5413, in assertValidFieldInitializationValue<br>    assertValidMFVec3f(value)<br>  File "C:\Users\john\X3DJSONLD\src\main\python\x3d.py", line 4965, in assertValidMFVec3f<br>    raise X3DTypeError(str(value)[:100] + ' has type ' + str(type(value)) + ' but is not a valid MFVec3f') from error<br>x3d.X3DTypeError: [0, 0, 0, 0, 5, 0] has type <class 'list'> but is not a valid MFVec3f<br>Error: ../python/net/coderextreme/data/arc4.py failed to parse<br><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Jun 12, 2022 at 8:40 PM Brutzman, Donald (Don) (CIV) <<a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div lang="EN-US"><div><p class="MsoNormal">John, thanks for various problem reports and example corrections, very helpful.<u></u><u></u></p><p class="MsoNormal"><br>Am happy to report integration of multiple fixes, and deployment of new version.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><ol style="margin-top:0in" start="1" type="a"><li>I eventually figured out how to fix the upgrade to Saxon HE 11.3 not working, which required addition of xmlresolver jar to CLASSPATH entries.  This unblocked many mysterious build problems. Apparently followed a solution path you had figured out too.  Details at<u></u><u></u></li></ol><p class="MsoNormal"><u></u> <u></u></p><ul style="margin-top:0in" type="disc"><li style="margin-left:0in"><a href="https://saxonica.plan.io/boards/3/topics/8478?r=8480" target="_blank">https://saxonica.plan.io/boards/3/topics/8478?r=8480</a><u></u><u></u></li><li style="margin-left:0in"><a href="https://sourceforge.net/p/x3d/code/33141" target="_blank">https://sourceforge.net/p/x3d/code/33141</a><u></u><u></u></li></ul><p class="MsoNormal"><u></u> <u></u></p><ol style="margin-top:0in" start="2" type="a"><li>You correctly reported missing HANIMVERSIONCHOICES and assertValidHanimVersion() in the updated build.  Cause was our recently disallowing HAnim version 1.0 in X3D4 since several internal design issues were incompatible in HAnim 2.0 and thus X3D4.  Thus only HAnim version 2.0 is now allowed.  This was previously fixed in X3D Schema, now also fixed in X3D DTD and X3D Tooltips and X3DUOM.  The generator stylesheet for x3d now included enumeration lists with only one value, restoring these HANIM version constructs.<u></u><u></u></li></ol><ul style="margin-top:0in" type="disc"><li style="margin-left:0in">Mantis 641: 26.3.2 - HAnim version number restriction<u></u><u></u></li><li style="margin-left:0in"><a href="https://www.web3d.org/member-only/mantis/view.php?id=641" target="_blank">https://www.web3d.org/member-only/mantis/view.php?id=641</a><u></u><u></u></li><li style="margin-left:0in"><a href="https://www.web3d.org/specifications/X3dDoctypeDocumentation4.0.html#HAnimHumanoid" target="_blank">https://www.web3d.org/specifications/X3dDoctypeDocumentation4.0.html#HAnimHumanoid</a><u></u><u></u></li><li style="margin-left:0in"><a href="https://www.web3d.org/specifications/X3dSchemaDocumentation4.0/x3d-4.0_HAnimHumanoid.html#Link45B" target="_blank">https://www.web3d.org/specifications/X3dSchemaDocumentation4.0/x3d-4.0_HAnimHumanoid.html#Link45B</a><u></u><u></u></li><li style="margin-left:0in"><a href="https://www.web3d.org/x3d/tooltips/X3dTooltips.html#HAnimHumanoid.version" target="_blank">https://www.web3d.org/x3d/tooltips/X3dTooltips.html#HAnimHumanoid.version</a><u></u><u></u></li></ul><p class="MsoNormal"><u></u> <u></u></p><ol style="margin-top:0in" start="3" type="a"><li>Also thanks for following report.  The x3d.py problem validating default values for MFVec2f (such as Extrusion crossSection) and other MFVec default values (such as Extrusion spine) is now fixed in the X3DPSAIL autogeneration of x3d.py.  Excerpt follows, hopefully fixing the test cases you have.  I believe such conversions from long arrays to arrays of typed tuples is already working in X3dToJson.xslt conversions, so this resolution improved x3d.py itself.<u></u><u></u></li></ol><ul style="margin-top:0in" type="disc"><li style="margin-left:0in">class Extrusion(_X3DGeometryNode):<u></u><u></u></li></ul><p>[…]<u></u><u></u></p><p>('crossSection', [(1, 1), (1, -1), (-1, -1), (-1, 1), (1, 1)], FieldType.MFVec2f, AccessType.initializeOnly, 'Extrusion'),<u></u><u></u></p><p>[…]<u></u><u></u></p><p>('spine', [(0, 0, 0), (0, 1, 0)], FieldType.MFVec3f, AccessType.initializeOnly, 'Extrusion'),<u></u><u></u></p><p>[…]<u></u><u></u></p><p>crossSection = [(1, 1), (1, -1), (-1, -1), (-1, 1), (1, 1)] # default<u></u><u></u></p><p>[…]<u></u><u></u></p><p>spine = [(0, 0, 0), (0, 1, 0)] # default<u></u><u></u></p><ul style="margin-top:0in" type="disc"><li style="margin-left:0in">etc.<u></u><u></u></li></ul><p class="MsoNormal"><u></u> <u></u></p><ol style="margin-top:0in" start="4" type="a"><li>Not yet announced broadly, pending ISO/IEC confirmation of acceptance, but have changed internal documentation links in X3DUOM and related products for X3D4 Architecture to change from Committee Draft 1 (CD1) to Draft International Specification (DIS).  Note that all of the effective specification prose is functionally identical, and all Mantis-driven changes for 4.0 are resolved.  The only document modification is removal of CSS-styled markings of proposed additions and proposed deletions.<u></u><u></u></li></ol><ul style="margin-top:0in" type="disc"><li style="margin-left:0in"><a href="https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-CD1/Part01/Architecture.html" target="_blank">https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-CD1/Part01/Architecture.html</a><u></u><u></u></li></ul><p class="MsoNormal" style="margin-left:0.5in">to<u></u><u></u></p><ul style="margin-top:0in" type="disc"><li style="margin-left:0in"><a href="https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-DIS/Part01/Architecture.html" target="_blank">https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-DIS/Part01/Architecture.html</a><u></u><u></u></li></ul><p class="MsoNormal"><u></u> <u></u></p><ol style="margin-top:0in" start="5" type="a"><li>Pylint log still reports some warnings, but “code has been rated at 9.97/10” and yesterday’s overnight build to convert all X3D models in X3D Examples Archive was pretty clean.  Steady improvement.  8)<u></u><u></u></li></ol><ul style="margin-top:0in" type="disc"><li style="margin-left:0in"><a href="https://www.web3d.org/x3d/stylesheets/python/build.pylint.log.txt" target="_blank">https://www.web3d.org/x3d/stylesheets/python/build.pylint.log.txt</a><u></u><u></u></li><li style="margin-left:0in"><a href="https://www.web3d.org/x3d/content/examples/build.python.all.log.txt" target="_blank">https://www.web3d.org/x3d/content/examples/build.python.all.log.txt</a><u></u><u></u></li></ul><p class="MsoNormal"><u></u> <u></u></p><ol style="margin-top:0in" start="6" type="a"><li>Am using Python 3.10.4.  Have checked in all X3DPSAIL improvements and deployed new x3d.py package version 4.0.64.1, passing acceptance tests on this end.  Hopefully working well for you too.  The TODO section seems mostly current, further improvements always welcome.<u></u><u></u></li></ol><ul style="margin-top:0in" type="disc"><li style="margin-left:0in"><a href="https://pypi.org/project/x3d" target="_blank">https://pypi.org/project/x3d</a><u></u><u></u></li><li style="margin-left:0in"><a href="https://www.web3d.org/x3d/stylesheets/python/python.html" target="_blank">https://www.web3d.org/x3d/stylesheets/python/python.html</a><u></u><u></u></li><li style="margin-left:0in"><a href="https://www.web3d.org/x3d/stylesheets/python/python.html#TODO" target="_blank">https://www.web3d.org/x3d/stylesheets/python/python.html#TODO</a><u></u><u></u></li></ul><p style="margin-left:0.25in"><u></u> <u></u></p><ol style="margin-top:0in" start="7" type="a"><li>Just noticed that Python itself issued a new release 3.10.5 a week ago.  Will post again when that upgrade is tested.<u></u><u></u></li></ol><ul style="margin-top:0in" type="disc"><li style="margin-left:0in">Python 3.10.5. Release Date: June 6, 2022 <u></u><u></u></li><li style="margin-left:0in"><a href="https://www.python.org/downloads/release/python-3105" target="_blank">https://www.python.org/downloads/release/python-3105</a><u></u><u></u></li></ul><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Again thanks for your excellent problem reports and example fixes.  Have fun with X3D Python!  8)<u></u><u></u></p><div><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New""><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">all the best, Don<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">-- <u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">Don Brutzman  Naval Postgraduate School, Code USW/Br        <a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a><u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA    +1.831.656.2149<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">X3D graphics, virtual worlds, Navy robotics https://</span> <span style="font-size:10pt;font-family:"Courier New""><a href="http://faculty.nps.edu/brutzman" target="_blank">faculty.nps.edu/brutzman</a><u></u><u></u></span></p></div><p class="MsoNormal"><u></u> <u></u></p><div><div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(225,225,225);padding:3pt 0in 0in"><p class="MsoNormal"><b>From:</b> John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>> <br><b>Sent:</b> Thursday, June 9, 2022 2:21 AM<br><b>To:</b> Brutzman, Donald (Don) (CIV) <<a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a>>; X3D Graphics public mailing list <<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a>><br><b>Subject:</b> x3d.py problem validating MFVec2f (non-specified crossSection) default value<u></u><u></u></p></div></div><p class="MsoNormal"><u></u> <u></u></p><div><div><p class="MsoNormal">The most important thing is last in this email, problems validating default MFVec2f crossSection field in x3d.py.  The rest of the email is background. <u></u><u></u></p><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">To get x3d.py (x3djsonld.py) to handle HelloWorldProgramOutput.json,  I had to remove Extrusions from the example, and change to Spheres. <u></u><u></u></p><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Below is the change to the example to make it work:<u></u><u></u></p><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">diff /c/x3d-code/<a href="http://www.web3d.org/x3d/stylesheets/java/examples/HelloWorldProgramOutput.json" target="_blank">www.web3d.org/x3d/stylesheets/java/examples/HelloWorldProgramOutput.json</a> HelloWorldProgramOutput.json<br>1135c1135<br><                 { "Extrusion":<br>---<br>>                 { "Sphere":<br>2392c2392<br><                 { "Extrusion":<br>---<br>>                 { "Sphere":<br>2693c2693<br>< }<br>\ No newline at end of file<br>---<br>> }<u></u><u></u></p></div></div><div><p class="MsoNormal">============================================================<u></u><u></u></p></div><div><p class="MsoNormal">If one does not make the change to the JSON file, the following error appears.  x3djsonld.py is in X3DJSONLD/src/main/python.<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">$ python x3djsonld.py<br>'''<br>x3d.py package 4.0.63.7 loaded, have fun with X3D Graphics!<br>'''<br>from x3d import *<br>from x3d import SFBool<br>print(<br>Traceback (most recent call last):<br>  File "C:\Users\john\X3DJSONLD\src\main\python\x3d.py", line 4668, in assertValidMFVec2f<br>    MFVec2f(value)<br>  File "C:\Users\john\X3DJSONLD\src\main\python\x3d.py", line 9184, in __init__<br>    self.value = value<br>  File "C:\Users\john\X3DJSONLD\src\main\python\x3d.py", line 9206, in value<br>    value = [(x, y) for x, y, in value]<br>  File "C:\Users\john\X3DJSONLD\src\main\python\x3d.py", line 9206, in <listcomp><br>    value = [(x, y) for x, y, in value]<br>ValueError: too many values to unpack (expected 2)<br><br>The above exception was the direct cause of the following exception:<br><br>Traceback (most recent call last):<br>  File "C:\Users\john\X3DJSONLD\src\main\python\x3djsonld.py", line 256, in <module><br>    print(parseObject("X3D", data, 0))<br>  File "C:\Users\john\X3DJSONLD\src\main\python\x3djsonld.py", line 178, in parseObject<br>    out += parseObject(k, v,indent+1)<br>  File "C:\Users\john\X3DJSONLD\src\main\python\x3djsonld.py", line 163, in parseObject<br>    out += parseObject(k, v,indent+1)<br>  File "C:\Users\john\X3DJSONLD\src\main\python\x3djsonld.py", line 192, in parseObject<br>    out += parseArray("[", "]", parent, key, v,indent+1, fieldType)<br>  File "C:\Users\john\X3DJSONLD\src\main\python\x3djsonld.py", line 57, in parseArray<br>    out += parseObject(parent, d,indent+1)<br>  File "C:\Users\john\X3DJSONLD\src\main\python\x3djsonld.py", line 178, in parseObject<br>    out += parseObject(k, v,indent+1)<br>  File "C:\Users\john\X3DJSONLD\src\main\python\x3djsonld.py", line 175, in parseObject<br>    out += parseObject(k, v,indent+1)<br>  File "C:\Users\john\X3DJSONLD\src\main\python\x3djsonld.py", line 178, in parseObject<br>    out += parseObject(k, v,indent+1)<br>  File "C:\Users\john\X3DJSONLD\src\main\python\x3djsonld.py", line 125, in parseObject<br>    fieldInfo = getField(parent, key)<br>  File "C:\Users\john\X3DJSONLD\src\main\python\x3djsonld.py", line 14, in getField<br>    cls = eval(grandparent)()<br>  File "C:\Users\john\X3DJSONLD\src\main\python\x3d.py", line 38948, in __init__<br>    self.crossSection = crossSection<br>  File "C:\Users\john\X3DJSONLD\src\main\python\x3d.py", line 39005, in crossSection<br>    assertValidMFVec2f(crossSection)<br>  File "C:\Users\john\X3DJSONLD\src\main\python\x3d.py", line 4672, in assertValidMFVec2f<br>    raise X3DTypeError(str(value)[:100] + ' has type ' + str(type(value)) + ' but is not a valid MFVec2f') from error<br>x3d.X3DTypeError: [(1, 1, 1, -1, -1, -1, -1, 1, 1, 1)] has type <class 'list'> but is not a valid MFVec2f<u></u><u></u></p></div><div><p class="MsoNormal">============================================================<u></u><u></u></p></div><div><p class="MsoNormal">What's wrong with the is handling the Extrusion when crossSection is not set, thus x3d.py:<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">    @crossSection.setter<br>    def crossSection(self, crossSection):<br>        if  crossSection is None:<br>            crossSection = [(1, 1, 1, -1, -1, -1, -1, 1, 1, 1)] # default<br>        assertValidMFVec2f(crossSection)<br>        self.__crossSection = crossSection<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Note that crossSection's default is not correct.<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Thanks for any fixes to x3d.py.  I will try to fix it now.<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">John<u></u><u></u></p></div></div></div></div></div></div></blockquote></div>
</blockquote></div>
</blockquote></div></div>
</blockquote></div>