WRL import Text not working: 'NoneType' object has no attribute 'split' #27

Closed
opened 2024-10-24 23:41:35 +02:00 by Cedric Steiert · 1 comment
Collaborator

Attached wrl file with text geo throws follwoing error:

Python: Traceback (most recent call last):
  File "__init__.py", line 85, in execute
    return import_x3d.load(context, **keywords)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "import_x3d.py", line 3765, in load
    load_web3d(context, filepath,
  File "import_x3d.py", line 3663, in load_web3d
    importShape(bpycollection, node, ancestry, global_matrix)
  File "import_x3d.py", line 3261, in importShape
    bpydata = geom_fn(geom, ancestry)
              ^^^^^^^^^^^^^^^^^^^^^^^
  File "import_x3d.py", line 3179, in importText
    body = [w.strip('"') for w in body.split('" "')]
                                  ^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'split'

https://graphcomp.com/info/specs/sgi/vrml/spec/part1/nodesRef.html#Text

Should look like this:
grafik

Attached wrl file with text geo throws follwoing error: ``` Python: Traceback (most recent call last): File "__init__.py", line 85, in execute return import_x3d.load(context, **keywords) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "import_x3d.py", line 3765, in load load_web3d(context, filepath, File "import_x3d.py", line 3663, in load_web3d importShape(bpycollection, node, ancestry, global_matrix) File "import_x3d.py", line 3261, in importShape bpydata = geom_fn(geom, ancestry) ^^^^^^^^^^^^^^^^^^^^^^^ File "import_x3d.py", line 3179, in importText body = [w.strip('"') for w in body.split('" "')] ^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'split' ``` https://graphcomp.com/info/specs/sgi/vrml/spec/part1/nodesRef.html#Text Should look like this: ![grafik](/attachments/2f239a5d-4614-4c8f-8f56-dde14c45c245)
Cedric Steiert added the
Normal
bug
confirmed
labels 2024-10-24 23:41:36 +02:00
Cedric Steiert changed title from WRL Text import not working to WRL import Text not working: 'NoneType' object has no attribute 'split' 2024-10-25 00:01:09 +02:00
Author
Collaborator

Hi @ideasman42 thanks for the fix and the cleanups, very appreciated. Though a patch version bump to 2.3.7 wasn't really necessary as the next release planned around blenders next release will get a minor bump to 2.4 due to some minor new features introduced.

Hi @ideasman42 thanks for the fix and the cleanups, very appreciated. Though a patch version bump to 2.3.7 wasn't really necessary as the next release planned around blenders next release will get a minor bump to 2.4 due to some minor new features introduced.
Sign in to join this conversation.
No description provided.