Page 1 of 2
Makehuman not working in arch linux - numpy 1.13.1
Posted:
Tue Sep 19, 2017 2:26 am
by artistafrustrado
After a system upgrade a few months ago, makehuman stoped exporting mhx2. At first I thought it was a problem with the mhx2 plugin but when I tested exporting to other formats, I got the same error.
As far as I can tell it has something to do with numpy but I have no idea how to fix it.
Write MHX2 file /home/artista/makehuman/v1/exports/teste.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 52, 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 (9416,)
Re: Makehuman not working in arch linux - numpy 1.13.1
Posted:
Tue Sep 19, 2017 7:56 am
by joepal
Do you happen to know which version of numpy was the last it worked with?
Anyway, it sounds like it is related to this bug:
http://bugtracker.makehumancommunity.org/issues/1184
Re: Makehuman not working in arch linux - numpy 1.13.1
Posted:
Tue Sep 19, 2017 8:19 am
by joepal
Can you edit core/module3d.py and insert a few debug lines? The relevant block (around line 311) now reads:
- Code: Select all
# Filter out and remap unused UVs
fuvs = self.fuvs[self.face_mask]
uv_idx = np.unique(fuvs.reshape(-1))
inverse_uv_idx = - np.ones(self.texco.shape[0], dtype=np.int32)
inverse_uv_idx[uv_idx] = np.arange(self.texco.shape[0], dtype=np.int32)
for i in xrange(self.vertsPerPrimitive):
fuvs[:,i] = inverse_uv_idx[fuvs[:,i]]
Can you change it so that it reads
- Code: Select all
# Filter out and remap unused UVs
fuvs = self.fuvs[self.face_mask]
uv_idx = np.unique(fuvs.reshape(-1))
print "\n\nTEXCO\n\n\n----" # NEW LINE
print self.texco.shape[0] # NEW LINE
print "----\n\n"; # NEW LINE
inverse_uv_idx = - np.ones(self.texco.shape[0], dtype=np.int32)
inverse_uv_idx[uv_idx] = np.arange(self.texco.shape[0], dtype=np.int32)
for i in xrange(self.vertsPerPrimitive):
fuvs[:,i] = inverse_uv_idx[fuvs[:,i]]
... start MH, add the clothing piece "female elegant suit", try to export via MHX2, and post the relevant sections of the console output (ie where it says "TEXCO") here?
Also, assuming this crashes as expected, can you retry the procedure, but also uncheck "hide faces under clothes" on the "clothes" tab, as well as set eyes to "none" on the "eyes" tab, and see if that makes anything different when exporting?
Re: Makehuman not working in arch linux - numpy 1.13.1
Posted:
Wed Sep 20, 2017 2:46 am
by artistafrustrado
This is what I got.
Write MHX2 file /home/artista/makehuman/v1/exports/debug.mhx2
TEXCO
----
21334
----
Exception during event onFileSelected
Traceback (most recent call last):
File "./core/events3d.py", line 219, 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 52, 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 314, 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 (11981,)
Re: Makehuman not working in arch linux - numpy 1.13.1
Posted:
Wed Sep 20, 2017 7:20 am
by joepal
Ok, right now I have no other solution than downgrading numpy to 1.11.0, which is known to be working.
Re: Makehuman not working in arch linux - numpy 1.13.1
Posted:
Sun Sep 24, 2017 10:22 pm
by thedude22
I've got the same problem also running Arch. I tried putting the numpy 1.11 module in the plugin folder and now I get this error instead.
I don't really know what I'm doing but I'm happy to help debug this if I can.
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 51, in export
from . import mh2mhx2
File "plugins/9_export_mhx2/mh2mhx2.py", line 26, in <module>
import numpy as np
File "plugins/9_export_mhx2/numpy/__init__.py", line 193, in <module>
from . import core
File "plugins/9_export_mhx2/numpy/core/__init__.py", line 25, in <module>
from . import numeric
File "plugins/9_export_mhx2/numpy/core/numeric.py", line 407, in <module>
einsum = multiarray.einsum
AttributeError: 'module' object has no attribute 'einsum'
Re: Makehuman not working in arch linux - numpy 1.13.1
Posted:
Sun Sep 24, 2017 11:52 pm
by loki1950
Numpy is not repeat not a plug-in it is a compiled module for Python so no surprise that putting it in the plug-in folder did not work you have to replace numpy 1.13.1 with numpy 1.11 which is a downgrade of a package that arch upgraded automatically not sure how one goes about this on arch but it will involve working in the system level files so root privileges are required for any changes you make.
Enjoy the Choice
Re: Makehuman not working in arch linux - numpy 1.13.1
Posted:
Mon Sep 25, 2017 12:41 am
by thedude22
I understand that numpy is not a makehuman plugin. I actually use numpy pretty frequently, which is why I don't want to downgrade my system module. Yes, maybe I can set up a virtual environment to run an older version of numpy just for makehuman, but I'd have to figure out how to do that, and I already have a lot of things to work on. I havn't yet needed to use virtual environments for anything else.
I just thought that if I put the source code for numpy 1.11.0 in the same folder as the MHX2 exporter plugin then it would use that instead of the system numpy module which is a later version, and it appears to do just that. At least that's how I interpreted the stacktrace, but it looks like it couldn't import it for some reason though. Like I said I don't really know what I'm doing here.
Re: Makehuman not working in arch linux - numpy 1.13.1
Posted:
Mon Sep 25, 2017 1:10 am
by thedude22
Ok apparently this plugin uses python 3? I discovered that my numpy 1.11.0 didn't work because it was the python 2.7 version. It's weird because the shell inside makehuman says it's 2.7 but apparently the plugin is not 2.7?
However this did not help solve the problem, as I'm just right back to the original shape mismatch error. It doesn't look like a problem with numpy, or at least using numpy 1.11.0 for python 3.5 didn't help. It might be a problem with the AUR version of makehuman. There is a bug complaint there. Hopefully it gets fixed.
Re: Makehuman not working in arch linux - numpy 1.13.1
Posted:
Mon Sep 25, 2017 3:20 am
by loki1950
Yes Python 2.7 is the right version for makehuman's stable version we are working on porting to Python 3 and updating from qt4 to qt5 as qt4 no longer has support but that branch is not yet ready for release.Maybe the AUR packager has miss read the proper dependencies for makehuman and assumed that we are using Python 3.
Enjoy the Choice