Sockets problem: Argument of type NoneType is not iterable

If your topic doesn't fit anywhere else, put it here.

Moderator: joepal

Sockets problem: Argument of type NoneType is not iterable

Postby Thyra » Mon Jul 20, 2020 6:37 pm

Hi,

I'm trying to model clothes in Blender for a MH-Character, but can't import the character.

OS: Mac OS High Sierra (that's why I can't use MH 1.2)
MH: 1.1
Blender 2.8

I had some trouble with the Sockets plugin because the 1.1 version is not the py3 version so the sockets plugin doesn't work by default. After I took the latest-release version from the git repo and set up everything in blender, when I click the "Import Human" button I'm now getting the following output in Sockets:

Code: Select all
Starting server thread.
Opening server socket...
opened at port 12345

Waiting for connection.
Connected with 127.0.0.1:60448
Client says: '{
  "function": "getBodyMeshInfo",
  "error": "",
  "params": {

  },
  "data": null
}
'
About to serialize JSON. This might take some time.
Waiting for connection.


And the following message in Blender:

Code: Select all
Traceback (most recent call last):
  File "/Users/***/Library/Application Support/Blender/2.80/scripts/addons/MH_Community/operators/bodyimport.py", line 14, in execute
    ImportBodyBinary()
  File "/Users/***/Library/Application Support/Blender/2.80/scripts/addons/MH_Community/mh_sync/import_body_binary.py", line 88, in __init__
    FetchServerData('getBodyMeshInfo', self.gotBodyInfo)
  File "/Users/***/Library/Application Support/Blender/2.80/scripts/addons/MH_Community/mh_sync/fetch_server_data.py", line 8, in __init__
    self.executeJsonCall(expectBinaryResponse=expectBinary, params=params)
  File "/Users/***/Library/Application Support/Blender/2.80/scripts/addons/MH_Community/mh_sync/sync_ops.py", line 19, in executeJsonCall
    self.callback(json_obj)
  File "/Users/***/Library/Application Support/Blender/2.80/scripts/addons/MH_Community/mh_sync/fetch_server_data.py", line 14, in callback
    self.readyFunction(json_obj.data)
  File "/Users/***/Library/Application Support/Blender/2.80/scripts/addons/MH_Community/mh_sync/import_body_binary.py", line 101, in gotBodyInfo
    if "name" in data:
TypeError: argument of type 'NoneType' is not iterable

location: <unknown location>:-1



What I read from this two logs is that the connection works but there is basicly no data supplied from MH to Blender and that's what the plugin is complaining about. Or am I assuming wrong?

Any ideas how to solve this?


My idea was to use the MHX2 Plugin instead, which works at first, I can export and import without a problem. However if I then in MakeCloth want execute "Extract Cloth", the plugin tells me that there are no vertex groups. So apparently in mhx2 format they are not exported.

Any ideas how to get the vertex groups?

Sorry for the long question, I didn't want to forget anything. I hope anyone can help because I'm running out of ideas what to try next.

Thank you in advance.
Thyra
 
Posts: 2
Joined: Mon Jul 20, 2020 6:18 pm

Re: Sockets problem: Argument of type NoneType is not iterab

Postby punkduck » Mon Jul 20, 2020 8:21 pm

I should check the code in github, if it has changed. But honestly we will not work with old version anymore. But makeclothes should work with old MakeHuman as well. Only for triangle meshes you have to change manually the maxpole number in .mhclo file (typically multiply it by 2) ...


I would propose to download the blend file I will append. It contains a bunch of bodies with and without helper (no kids atm, but male, female, a-posed, t-posed).
unzip the file ... there are two blend-files.

Use newest makeclothes version from master path. I have a pending merge request. As long it is not done:

simply append (blender standard method) a mesh from one of the blend files (with helpers of course).

Just for information:

When the merge request is done, these files (or similar ones) will be placed in a directory called "humans" inside makeclothes and you can append the body you need with one click.

Since it is a blend file with some name conventions it is no rocket science and easy to understand what is happening.


First part of documentation is ready to go, I will continue when merge is done:

http://www.makehumancommunity.org/wiki/Documentation:Features_of_new_Blender_plugin

blendfiles.zip
a bunch of bodies
(8.53 MiB) Downloaded 420 times


So it should also work for you, because I am partly working with old version, The only problem could be that triangle problem I mentioned.

Greetings
punkduck
User avatar
punkduck
 
Posts: 1218
Joined: Mon Oct 17, 2016 7:24 pm
Location: Nuremberg, Germany

Re: Sockets problem: Argument of type NoneType is not iterab

Postby Thyra » Wed Jul 22, 2020 11:17 am

Thank you so much for your reply, this is the best (and fastest) reply I've ever gotten in a forum, it's working now.

The .blend files you uploaded are extremely helpful and I'm working with them now to get the helpers. Together with the cloth physics for blender this works really well for my own models. Although the documenation you linked helped a lot to make some things clearer for me.

Thank you for you time and effort :D
Thyra
 
Posts: 2
Joined: Mon Jul 20, 2020 6:18 pm

Re: Sockets problem: Argument of type NoneType is not iterab

Postby RobBaer » Mon Jul 27, 2020 9:55 pm

Thyra wrote:Hi,

I'm trying to model clothes in Blender for a MH-Character, but can't import the character.

OS: Mac OS High Sierra (that's why I can't use MH 1.2)
MH: 1.1
Blender 2.8

...

There is no installer for Mac OS, but MakeHuman 1.2 seems to run well from source on modern MacOS. To make this work you need a proper python 3 install and a couple of dependencies, but it is easier that it sounds.
User avatar
RobBaer
 
Posts: 1209
Joined: Sat Jul 13, 2013 3:30 pm
Location: Kirksville, MO USA


Return to General discussions about makehuman

Who is online

Users browsing this forum: No registered users and 1 guest