Blender Import problems with MH plugin

Tech support and suggestions forum. If you only have a basic question on how to get started, please use the "newbies" forum in the community section.

Moderator: joepal

Blender Import problems with MH plugin

Postby SaltyCowdawg » Wed Dec 11, 2019 3:55 pm

I just ran into a strange case with one of my models.
raabia-snap.png
Raabi'a -- one of the denizens of Star City


When I try to use the MH plugin for Blender it fails and spews. Spew follows.
Code: Select all
Read prefs: /home/peter/.config/blender/2.81/config/userpref.blend
found bundled python: /home/peter/apps/blender-2.81-linux-glibc217-x86_64/2.81/python
Loading MH community plug-in v 0.6.2
Loading sync plug-in
sync plug-in loaded
Loading kinect Sensor plug-in
kinect Sensor plug-in loaded
MH community plug-in load complete
/home/peter/.config/blender/2.81/makehuman.default.settings.json
Registered Carver
register
Traceback (most recent call last):
  File "/home/peter/.config/blender/2.81/scripts/addons/NodeCustomBuilder/__init__.py", line 259, in execute
    material = bpy.context.object.active_material
AttributeError: 'NoneType' object has no attribute 'active_material'

location: /home/peter/apps/blender-2.81-linux-glibc217-x86_64/2.81/scripts/modules/bpy/ops.py:201

location: /home/peter/apps/blender-2.81-linux-glibc217-x86_64/2.81/scripts/modules/bpy/ops.py:201
Error: Traceback (most recent call last):
  File "/home/peter/.config/blender/2.81/scripts/addons/NodeCustomBuilder/__init__.py", line 259, in execute
    material = bpy.context.object.active_material
AttributeError: 'NoneType' object has no attribute 'active_material'

location: /home/peter/apps/blender-2.81-linux-glibc217-x86_64/2.81/scripts/modules/bpy/ops.py:201

Traceback (most recent call last):
  File "/home/peter/.config/blender/2.81/scripts/addons/NodeCustomBuilder/__init__.py", line 68, in handler
    bpy.ops.custom.blend_select()
  File "/home/peter/apps/blender-2.81-linux-glibc217-x86_64/2.81/scripts/modules/bpy/ops.py", line 201, in __call__
    ret = op_call(self.idname_py(), None, kw)
RuntimeError: Error: Traceback (most recent call last):
  File "/home/peter/.config/blender/2.81/scripts/addons/NodeCustomBuilder/__init__.py", line 259, in execute
    material = bpy.context.object.active_material
AttributeError: 'NoneType' object has no attribute 'active_material'

location: /home/peter/apps/blender-2.81-linux-glibc217-x86_64/2.81/scripts/modules/bpy/ops.py:201


Traceback (most recent call last):
  File "/home/peter/.config/blender/2.81/scripts/addons/NodeCustomBuilder/__init__.py", line 259, in execute
    material = bpy.context.object.active_material
AttributeError: 'NoneType' object has no attribute 'active_material'

location: /home/peter/apps/blender-2.81-linux-glibc217-x86_64/2.81/scripts/modules/bpy/ops.py:201

location: /home/peter/apps/blender-2.81-linux-glibc217-x86_64/2.81/scripts/modules/bpy/ops.py:201
Error: Traceback (most recent call last):
  File "/home/peter/.config/blender/2.81/scripts/addons/NodeCustomBuilder/__init__.py", line 259, in execute
    material = bpy.context.object.active_material
AttributeError: 'NoneType' object has no attribute 'active_material'

location: /home/peter/apps/blender-2.81-linux-glibc217-x86_64/2.81/scripts/modules/bpy/ops.py:201

Traceback (most recent call last):
  File "/home/peter/.config/blender/2.81/scripts/addons/NodeCustomBuilder/__init__.py", line 73, in init_handler
    bpy.ops.custom.blend_select()
  File "/home/peter/apps/blender-2.81-linux-glibc217-x86_64/2.81/scripts/modules/bpy/ops.py", line 201, in __call__
    ret = op_call(self.idname_py(), None, kw)
RuntimeError: Error: Traceback (most recent call last):
  File "/home/peter/.config/blender/2.81/scripts/addons/NodeCustomBuilder/__init__.py", line 259, in execute
    material = bpy.context.object.active_material
AttributeError: 'NoneType' object has no attribute 'active_material'

location: /home/peter/apps/blender-2.81-linux-glibc217-x86_64/2.81/scripts/modules/bpy/ops.py:201


Import body
Traceback (most recent call last):
  File "/home/peter/.config/blender/2.81/scripts/addons/MH_Community/operators/bodyimport.py", line 14, in execute
    ImportBodyBinary()
  File "/home/peter/.config/blender/2.81/scripts/addons/MH_Community/mh_sync/import_body_binary.py", line 84, in __init__
    FetchServerData('getBodyMeshInfo', self.gotBodyInfo)
  File "/home/peter/.config/blender/2.81/scripts/addons/MH_Community/mh_sync/fetch_server_data.py", line 8, in __init__
    self.executeJsonCall(expectBinaryResponse=expectBinary, params=params)
  File "/home/peter/.config/blender/2.81/scripts/addons/MH_Community/mh_sync/sync_ops.py", line 17, in executeJsonCall
    json_obj = self.call.send(host=bpy.context.scene.MhHost, port=bpy.context.scene.MhPort, expectBinaryResponse=expectBinaryResponse)
  File "/home/peter/.config/blender/2.81/scripts/addons/MH_Community/mh_sync/JsonCall.py", line 224, in send
    data = JsonCall(data)
  File "/home/peter/.config/blender/2.81/scripts/addons/MH_Community/mh_sync/JsonCall.py", line 31, in __init__
    self.initializeFromJson(jsonData)
  File "/home/peter/.config/blender/2.81/scripts/addons/MH_Community/mh_sync/JsonCall.py", line 43, in initializeFromJson
    j = json.loads(jsonData)
  File "/home/peter/apps/blender-2.81-linux-glibc217-x86_64/2.81/python/lib/python3.7/json/__init__.py", line 348, in loads
    return _default_decoder.decode(s)
  File "/home/peter/apps/blender-2.81-linux-glibc217-x86_64/2.81/python/lib/python3.7/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/home/peter/apps/blender-2.81-linux-glibc217-x86_64/2.81/python/lib/python3.7/json/decoder.py", line 353, in raw_decode
    obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Invalid control character at: line 8 column 16 (char 95)

location: <unknown location>:-1

location: <unknown location>:-1



I had thought the problem might be the glottal stop in her name so I took it out and resaved her. Still the plugin doesn't like this model for some reason. Can't understand why she's a nice girl... maybe not one you'd bring home to momma but a nice girl none-the-less. ;)
Peter L. Berghold <peter@berghold.net> or <Salty.Cowdawg@gmail.com>
Retired IT with 30+ years in the business
User avatar
SaltyCowdawg
 
Posts: 458
Joined: Fri Aug 09, 2013 3:12 pm
Location: Ayden NC

Found it!

Postby SaltyCowdawg » Wed Dec 11, 2019 3:59 pm

<sigh!>

Seems there was a trailing space in both the filename she was saved to and in the metadata. Removed the trailing space and it fixed the problem.

Shheeesh... I get myself into trouble easily these days....
Peter L. Berghold <peter@berghold.net> or <Salty.Cowdawg@gmail.com>
Retired IT with 30+ years in the business
User avatar
SaltyCowdawg
 
Posts: 458
Joined: Fri Aug 09, 2013 3:12 pm
Location: Ayden NC

Re: Blender Import problems with MH plugin

Postby loki1950 » Wed Dec 11, 2019 6:01 pm

No you just forget that computers are very anal retentive ;) if there is a nit to pick it comes to fore but with no real explanation.

Enjoy the Choice :)
my box::HP Envy i5-6400 @2Q70GHzx4 8 Gb ram/1 Tb(Win10 64)/3 Tb Mint 19.2/GTX745 4Gb acer S243HL K222HQL
Q8200/Asus P5QDLX/8 Gb ram/WD 2Tb 2-500 G HD/GF GT640 2Gb Mint 17.3 64 bit Win 10 32 bit acer and Lenovo Ideapad 320-15ABR Win 10/Mint 19
User avatar
loki1950
 
Posts: 1219
Joined: Thu Dec 18, 2014 6:27 pm
Location: Ottawa,Ontario

Re: Blender Import problems with MH plugin

Postby SaltyCowdawg » Wed Dec 11, 2019 6:04 pm

I would have thought (and I don't mean this to criticize) is some kind of format checking would be done before writing the JSON file. I know that code I've written in the past was OCD enough to check for gotchas like that, but then again even I missed that sometimes when writing code. I was blessed (cursed?) to have a tester that found problems like that very quickly. He could break code in ways I never would have thought about.
Peter L. Berghold <peter@berghold.net> or <Salty.Cowdawg@gmail.com>
Retired IT with 30+ years in the business
User avatar
SaltyCowdawg
 
Posts: 458
Joined: Fri Aug 09, 2013 3:12 pm
Location: Ayden NC

Re: Blender Import problems with MH plugin

Postby loki1950 » Wed Dec 11, 2019 6:18 pm

Java Script is a bit minimalist when it comes to it's parsing functions most implementations have to be embedded in web browsers so the pressure to keep it simple is great.

Enjoy the Choice :)
my box::HP Envy i5-6400 @2Q70GHzx4 8 Gb ram/1 Tb(Win10 64)/3 Tb Mint 19.2/GTX745 4Gb acer S243HL K222HQL
Q8200/Asus P5QDLX/8 Gb ram/WD 2Tb 2-500 G HD/GF GT640 2Gb Mint 17.3 64 bit Win 10 32 bit acer and Lenovo Ideapad 320-15ABR Win 10/Mint 19
User avatar
loki1950
 
Posts: 1219
Joined: Thu Dec 18, 2014 6:27 pm
Location: Ottawa,Ontario


Return to Bugs, problems and feature requests

Who is online

Users browsing this forum: Google [Bot] and 1 guest

cron