SOLVED: MHX2 export broken on Ubuntu 18.04

Discussions about MHX2 and other plugins that are developed outside the scope of MakeHuman. Note that bug reports should go to the respective code projects and might go unseen here.

Moderator: joepal

SOLVED: MHX2 export broken on Ubuntu 18.04

Postby wolgade » Sun May 06, 2018 6:16 pm

This is most probably related to http://www.makehumancommunity.org/forum/viewtopic.php?f=3&t=16095.

The bug doesn't exist on Ubuntu 16.04.4 LTS (Python 2.7.12), but on Ubuntu 18.04 LTS (Python 2.7.15rc1)
It only occurs when you have no proxy mesh (alternative topology) selected. With a proxy mesh (e.g. generic female) export works fine.

How to reproduce:
Start MH.
Choose default rig.
Export MHX2 (default settings)

Code: Select all
hiding task Skeleton
showing task Export
Write MHX2 file /home/wolgade/makehuman/v1/exports/ttttt.mhx2
Exception during event onFileSelected
Traceback (most recent call last):
  File "./core/events3d.py", line 211, in callEvent
    method(event)
  File "./apps/gui/guiexport.py", line 112, in onFileSelected
    exporter.export(gui3d.app.selectedHuman, filename)
  File "plugins/9_export_mhx2/__init__.py", line 55, in export
    mh2mhx2.exportMhx2(filename("mhx2"), cfg)
  File "plugins/9_export_mhx2/mh2mhx2.py", line 55, in exportMhx2
    meshes = [obj.mesh.clone(cfg.scale, True) for obj in objects]
  File "./core/module3d.py", line 160, in clone
    self.filterMaskedVerts(other, update=False)
  File "./core/module3d.py", line 311, in filterMaskedVerts
    inverse_uv_idx[uv_idx] = np.arange(self.texco.shape[0], dtype=np.int32)
ValueError: shape mismatch: value array of shape (21334,) could not be broadcast to indexing result of shape (14517,)
Last edited by wolgade on Mon May 07, 2018 11:05 am, edited 1 time in total.
wolgade
 
Posts: 795
Joined: Wed Jan 30, 2013 6:50 pm

Re: MHX2 export broken on Ubuntu 18.04

Postby RobBaer » Sun May 06, 2018 7:22 pm

This looks remarkably like the known numpy issue that has been fixed in the latest stable source. I think if you revert you numpy to version 1.12 it should work with the release versions. Give it a try. Alternatively, pull source from the bitbucket repository.
User avatar
RobBaer
 
Posts: 1208
Joined: Sat Jul 13, 2013 3:30 pm
Location: Kirksville, MO USA

Re: MHX2 export broken on Ubuntu 18.04

Postby wolgade » Sun May 06, 2018 8:09 pm

RobBaer wrote:This looks remarkably like the known numpy issue that has been fixed in the latest stable source. [..] Alternatively, pull source from the bitbucket repository.

It is the latest source from bitbucket including your fixes that have been merged by Thomas 13 days ago.
wolgade
 
Posts: 795
Joined: Wed Jan 30, 2013 6:50 pm

Re: MHX2 export broken on Ubuntu 18.04

Postby Aranuvir » Sun May 06, 2018 10:04 pm

It is not a MHX problem, but a MakeHuman problem, all exports are broken. And development has moved to github, though I'd consider the code partially stable...
Aranuvir
 
Posts: 1314
Joined: Sun Oct 12, 2014 2:12 pm

Re: MHX2 export broken on Ubuntu 18.04

Postby RobBaer » Sun May 06, 2018 10:29 pm

Aranuvir wrote: ..., all exports are broken...


Exports have not been broken for me???

The numpy fix has been aded to both stable and default on bitbucket by Jonas
https://bitbucket.org/MakeHuman/makehum ... 55c2d2d04d

And here on python 3 community fork:
https://github.com/makehumancommunity/m ... 8b9ce617a3

Unless specified otherwise, I was assuming Wolgade was using release version MH 1.1.1 since he mentions Python 2.7 . On ubuntu, numpy is not part of the distro and Ubuntu 18.04 uses numpy 1.14, (I think) -- thus code that worked on 16.04 with numpy 1.11, but no longer works on 18.04 with its newer numpy.
User avatar
RobBaer
 
Posts: 1208
Joined: Sat Jul 13, 2013 3:30 pm
Location: Kirksville, MO USA

Re: MHX2 export broken on Ubuntu 18.04

Postby Aranuvir » Mon May 07, 2018 5:41 am

Sigh... All exports will be broken with the numpy bug. The bug is not a problem for users who use a MakeHuman package (= Windows!) where numpy is included. But on Linux numpy is just a dependency coming from the OS and with U18.04 the bug gets evident, what we expected ...

Perhaps we should consider a minor release (something like 1.1.1a) for this bug and Linux users?
Aranuvir
 
Posts: 1314
Joined: Sun Oct 12, 2014 2:12 pm

SOLVED: MHX2 export broken on Ubuntu 18.04

Postby wolgade » Mon May 07, 2018 11:04 am

Solved. The problem was the guy in front of the monitor.
RobBaer wrote:The numpy fix has been aded to both stable and default on bitbucket by Jonas
https://bitbucket.org/MakeHuman/makehum ... 55c2d2d04d

And there I started thinking why I never saw this fix, why I haven't seen any commits for 14 months. Reason: I created a fork on Bitbucket, forgot about it and never merged commits. :oops: After merging the fix done by Jonas everything works fine.

Sorry for being an idiot. Gonna bang my head against the wall for a while now.
wolgade
 
Posts: 795
Joined: Wed Jan 30, 2013 6:50 pm

Re: SOLVED: MHX2 export broken on Ubuntu 18.04

Postby Joel_S » Mon May 14, 2018 1:58 am

Hi, I have the same problem.

I installed from the PPA (v1.1.1) as described in the documentation. Do I need to build it from source to apply the above fix?
Joel_S
 
Posts: 3
Joined: Mon May 14, 2018 1:12 am

Re: SOLVED: MHX2 export broken on Ubuntu 18.04

Postby loki1950 » Mon May 14, 2018 3:33 am

Welcome Joel no you do not have to build from source as Python is an interpreted language just get the latest version of mhx2 from the bitbucket repo extract the zip and put the two scripts in their proper places you will have to use sudo to place mhx2 plugin in the plugin's folder of the makehuman app as you used the PPA version which puts it in system land under usr/ the blender script goes into the blender addons folder which is under .config/blender/2.79/scripts/addons the addons folder will not exist if you have not installed any blender addons so just create it or install the addon with the "install fro file" button in the the blender preferences window.

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: SOLVED: MHX2 export broken on Ubuntu 18.04

Postby Joel_S » Mon May 14, 2018 9:48 am

Hi Loki, thanks for the response.

I meant do I need to build MakeHuman from source :) . Someone mentioned earlier in the tread that there is a version 1.1.2 which is not available in the PPA.

If you mean download the MHX2 zip archive from here: https://bitbucket.org/Diffeomorphic/mhx2-makehuman-exchange/downloads/ that is what I did. The option is available but throws an exception when I export (none of the formats work but MHX2 is the one that i'm after).

This is the output:

Code: Select all
showing task Export
Write MHX2 ~/Documents/Blends/People/Main_Guy/Main_Guy.mhx2
Exception during event onFileSelected
Traceback (most recent call last):
  File "./core/events3d.py", line 211, in callEvent
    method(event)
  File "./apps/gui/guiexport.py", line 112, in onFileSelected
    exporter.export(gui3d.app.selectedHuman, filename)
  File "plugins/9_export_mhx2/__init__.py", line 55, in export
    mh2mhx2.exportMhx2(filename("mhx2"), cfg)
  File "plugins/9_export_mhx2/mh2mhx2.py", line 55, in exportMhx2
    meshes = [obj.mesh.clone(cfg.scale, True) for obj in objects]
  File "./core/module3d.py", line 160, in clone
    self.filterMaskedVerts(other, update=False)
  File "./core/module3d.py", line 311, in filterMaskedVerts
    inverse_uv_idx[uv_idx] = np.arange(self.texco.shape[0], dtype=np.int32)
ValueError: shape mismatch: value array of shape (21334,) could not be broadcast to indexing result of shape (14517,)
Joel_S
 
Posts: 3
Joined: Mon May 14, 2018 1:12 am

Next

Return to MHX2 and other plugins developed outside MakeHuman

Who is online

Users browsing this forum: No registered users and 1 guest