2 errors when Launch Mapclient: 1. warning: Mayavi not imported, 2error on "no module named vtkIOXMLParserPython"

Provides an easy-to-use application for visualising imaging data, segmenting images, creating volumetric meshes, and exporting OpenSim and FE models.
POST REPLY
User avatar
Jia Liu
Posts: 4
Joined: Thu Oct 01, 2015 4:10 pm

2 errors when Launch Mapclient: 1. warning: Mayavi not imported, 2error on "no module named vtkIOXMLParserPython"

Post by Jia Liu » Thu Sep 05, 2019 4:33 pm

Hi,

I am trying to use Mapclient for my research but run into difficulty figuring out the solution for 1 warning and 1 error. So I am here looking for professional help. Thank you all in advance!

After following the installation instruction from FAI workshop and the associated installation video, I run into the following warning and error when launching mapclient. They are both bolded in the quote.
WARNING: Mayavi not imported, no 3-D visualisation
Mayavi not imported, 3D visualisation will be disabled

05/09/2019 - 16:24:21.321 - mapclient.core.managers.pluginmanager - WARNING - Plugin 'fieldworkgait2392geomstep' not loaded
05/09/2019 - 16:24:21.345 - mapclient.core.managers.pluginmanager - WARNING - Reason: No module named vtkIOXMLParserPython
05/09/2019 - 16:24:21.365 - mapclient.core.managers.pluginmanager - WARNING - Traceback (most recent call last):
File "c:\users\sodab\anaconda2\envs\map-client-py27\lib\site-packages\mapclient\core\managers\pluginmanager.py", line 317, in load
module = import_module(PLUGINS_PACKAGE_NAME + '.' + modname)
File "c:\users\sodab\anaconda2\envs\map-client-py27\lib\importlib\__init__.py", line 37, in import_module
__import__(name)
File "c:\users\sodab\appdata\roaming\musculoskeletal\mapclient\venv_0.13.2\lib\site-packages\mapclientplugins\fieldworkgait2392geomstep\__init__.py", line 11, in <module>
from mapclientplugins.fieldworkgait2392geomstep import step
File "c:\users\sodab\appdata\roaming\musculoskeletal\mapclient\venv_0.13.2\lib\site-packages\mapclientplugins\fieldworkgait2392geomstep\step.py", line 31, in <module>
from mapclientplugins.fieldworkgait2392geomstep.configuredialog import ConfigureDialog
File "c:\users\sodab\appdata\roaming\musculoskeletal\mapclient\venv_0.13.2\lib\site-packages\mapclientplugins\fieldworkgait2392geomstep\configuredialog.py", line 5, in <module>
from mapclientplugins.fieldworkgait2392geomstep.gait2392geomcustomiser import VALID_UNITS, VALID_MODEL_MARKERS
File "c:\users\sodab\appdata\roaming\musculoskeletal\mapclient\venv_0.13.2\lib\site-packages\mapclientplugins\fieldworkgait2392geomstep\gait2392geomcustomiser.py", line 31, in <module>
from gias2.mesh import vtktools
File "c:\users\sodab\anaconda2\envs\map-client-py27\lib\site-packages\gias2\mesh\vtktools.py", line 19, in <module>
import vtk
File "c:\users\sodab\anaconda2\envs\map-client-py27\lib\site-packages\vtk\__init__.py", line 65, in <module>
from .vtkIOXMLParser import *
File "c:\users\sodab\anaconda2\envs\map-client-py27\lib\site-packages\vtk\vtkIOXMLParser.py", line 9, in <module>
from vtkIOXMLParserPython import *
ImportError: No module named vtkIOXMLParserPython
________________________________________________________________________________
Do you have vtk installed properly?
VTK (and build instructions) can be obtained from http://www.vtk.org
For the error of 'No module named vtkIOXMLParserPython', I checked the folder c:\users\sodab\anaconda2\envs\map-client-py27\lib\site-packages\vtk, it indeed doesnt have the required module 'vtkIOXMLParserPython.py'' but there exists a 'vtkIOXMLParserPython.pyd'.

I am not sure whether it is related. when opening the 'gait2392_cust'. the invalid workflow error occurs again even after I restarted the mapclient.


Thank you all!!
Best,
Jia

User avatar
Bryce Killen
Posts: 104
Joined: Mon Nov 24, 2014 7:12 pm

Re: 2 errors when Launch Mapclient: 1. warning: Mayavi not imported, 2error on "no module named vtkIOXMLParserPython"

Post by Bryce Killen » Fri Sep 06, 2019 12:24 am

Hi Jia,

There is a lot unpack here, but I would have a guess that the two issues are some what related.

1. If you launch an anaconda prompt and run ipython , if you then try to import mayavi using : import mayavi does it successfully import ?

2. What version of vtk are you using ? if you launch and import vtk you can check using the following

import vtk
vtk.vtkVersion.GetVTKVersion()

You should use vtk version 6.3.0

Let me know the results from the two points and we can continue working.

Bryce

User avatar
Jia Liu
Posts: 4
Joined: Thu Oct 01, 2015 4:10 pm

Re: 2 errors when Launch Mapclient: 1. warning: Mayavi not imported, 2error on "no module named vtkIOXMLParserPython"

Post by Jia Liu » Fri Sep 06, 2019 7:39 am

Hi Dr. Killen,

Thanks so much for your quick reply.

1. impcorting mayavi didnt seem to work? even when i type "mapclient" in the anaconda command line later, the same warning of 'mayavi not imported..' comes again.

(base) C:\Users\sodab>conda activate map-client-py27

(map-client-py27) C:\Users\sodab>ipython
Python 2.7.15 (default, Jul 2 2019, 00:55:11) [MSC v.1500 64 bit (AMD64)]
Type "copyright", "credits" or "license" for more information.

IPython 5.8.0 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.

In [1]: import mayavi

In [2]:
2. the version of vtk is 7.1.*, so i tried to install vtk=6.3.0, it turns out that this version of vtk is conflicted with mayavi.

(map-client-py27) C:\Users\sodab>conda install -c rahuljain vtk==6.3.0
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: \
Found conflicts! Looking for incompatible packages.
This can take several minutes. Press CTRL-C to abort.
\ failed

UnsatisfiableError: The following specifications were found to be incompatible with a past
explicit spec that is not an explicit spec in this operation (vtk):

- vtk==6.3.0

The following specifications were found to be incompatible with each other:



Package vtk conflicts for:
mayavi -> vtk[version='7.1.*|8.1.*|8.2.0.*|7.1.0']



(map-client-py27) C:\Users\sodab>conda list mayavi
# packages in environment at C:\Users\sodab\Anaconda2\envs\map-client-py27:
#
# Name Version Build Channel
mayavi 4.5.0 np111py27_vc9_1 conda-forge

3. sorry there was another error that I did mention and I thought it was related to vtk. I am using opensim 4.0 should i use 3.3 instead?
import opensim
File "c:\users\sodab\anaconda2\envs\map-client-py27\lib\site-packages\opensim\__init__.py", line 1, in <module>
from .simbody import *
File "c:\users\sodab\anaconda2\envs\map-client-py27\lib\site-packages\opensim\simbody.py", line 18, in <module>
_simbody = swig_import_helper()
File "c:\users\sodab\anaconda2\envs\map-client-py27\lib\site-packages\opensim\simbody.py", line 17, in swig_import_helper
return importlib.import_module(mname)
File "c:\users\sodab\anaconda2\envs\map-client-py27\lib\importlib\__init__.py", line 37, in import_module
__import__(name)
ImportError: DLL load failed: The specified module could not be found.

THANKS!!!

User avatar
Bryce Killen
Posts: 104
Joined: Mon Nov 24, 2014 7:12 pm

Re: 2 errors when Launch Mapclient: 1. warning: Mayavi not imported, 2error on "no module named vtkIOXMLParserPython"

Post by Bryce Killen » Sat Sep 07, 2019 2:54 am

Hi Jia,


hmmm it seems to be a number of problems related to the installation of the required packages.

I'm not sure which instructions would initially but I would delete the entire environment and start again.

I would follow the user guide and videos in the document section of this SimTK page. When installing vtk, I would ensure that the version is 6.3.0 BEFORE installing mayavi and make sure it is correct.

Re the opensim problem, this is related to the installation of the python bindings. I would ensure you are always in the dedicated mapclient environment in anaconda.

Also in the documents tab there is an "environment" file which you can use to install all the required dependencies (not gias or opensim), which you can use to "copy" the correct versions. Instructions on how to do this can be seen in a previous forum post or here

https://docs.conda.io/projects/conda/en ... nvironment

Once you have re-installed MAP Client let me know how and if the errors persist.

Best
Bryce

User avatar
Jia Liu
Posts: 4
Joined: Thu Oct 01, 2015 4:10 pm

Re: 2 errors when Launch Mapclient: 1. warning: Mayavi not imported, 2error on "no module named vtkIOXMLParserPython"

Post by Jia Liu » Tue Sep 24, 2019 8:02 am

Hi Dr. Killen,

Thanks for the reply. I tried to do both cloning environment and following the installation instructions. I think I got it working on my laptop but not the desktop. Anyway, just glad to finally get it to work. Thank you.

I do have an unrelated question and hope to get your inputs. I tried to follow the FAI workshop material and was able to export the opensim model (I think). My question is: will the muscle attachments, via points, etc be updated to be more subject specific? The webinar says a PhD student was working on it because it was a bit visually off locations at that time. I am asking because I am interested in getting subject-specific muscle moment arm, force length relationship, etc from opensim.
Looking forward to hearing your opinion.

Thank you.

Jia

User avatar
Bryce Killen
Posts: 104
Joined: Mon Nov 24, 2014 7:12 pm

Re: 2 errors when Launch Mapclient: 1. warning: Mayavi not imported, 2error on "no module named vtkIOXMLParserPython"

Post by Bryce Killen » Tue Sep 24, 2019 8:24 am

Hi Jia,

Good to know you got it working, at least on the laptop. For a bit of further info, what version of Windows are you running ? I know there was some issues with Windows 10 compatibility issues. If you are still having trouble feel free to repost issues and we can try to troubleshoot it.

RE: Muscles, this is a long answer.
(1) Fixed origin/insertion points, the version of the MAP Plugins which are available through the FAI workshop download use the host-mesh fitting procedure to re-define MTU path points. This method is also used for the via points in this iteration. There is a updated method for defining the fixed origin/insertion points which uses an anatomical atlas and ensures the muscle attaches on the bone. I have a version of this and will check somethings about the sharing of this plugin and provide you a link for the download when I can.

(2) Intermediate path points, as I said abvoe the iteration from the FAI workshop uses a HMF for defining the via points, similar to the fixed points, there is a new method for defining these points, again I will check with some people about sharing these updates. Additionally I have been working on an alternative method which uses wrapping surfaces instead of via points. This solution still requires a bit of work and as such not available until I am able to work out some kinks in the process.

For both these solution, problems are still present with the MTU kinematics (i.e., MTU lengths and moment arms), I am hoping to find time in the near future to explore some options for fixing these issues. I would be interested in hearing a bit more about your project and we can potentially brainstorm some intermediate solutions and/or I can keep you in the loop with updates/changes regarding this. I have sent you a message on SimTK with my contact, if you can send a little information about your project we can see where MAP fits.

Thanks

Bryce

User avatar
SWITHIN razu
Posts: 2
Joined: Wed Jul 14, 2021 11:01 am

Re: 2 errors when Launch Mapclient: 1. warning: Mayavi not imported, 2error on "no module named vtkIOXMLParserPython"

Post by SWITHIN razu » Wed Jul 14, 2021 11:05 am

Launch mapclient error:
qt.qpa.plugin: Could not load the Qt platform plugin "windows" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: direct2d, minimal, offscreen, webgl, windows.


I get the above error when i launch mapclient using the terminal.
Thanks,
Swithin

User avatar
Bryce Killen
Posts: 104
Joined: Mon Nov 24, 2014 7:12 pm

Re: 2 errors when Launch Mapclient: 1. warning: Mayavi not imported, 2error on "no module named vtkIOXMLParserPython"

Post by Bryce Killen » Thu Jul 15, 2021 3:20 am

It seems this is an installation problem.

Did you following the most up to date installation instructions which are on this SimTK page ?

Bryce

User avatar
SWITHIN razu
Posts: 2
Joined: Wed Jul 14, 2021 11:01 am

Re: 2 errors when Launch Mapclient: 1. warning: Mayavi not imported, 2error on "no module named vtkIOXMLParserPython"

Post by SWITHIN razu » Mon Jul 19, 2021 12:45 pm

Hi Bryce,
I followed the instructions found in documents> user guides> basic installation instructions

I first want to ensure that i am installing the correct versions of these programs and would love to get the recommended versions.
The issue could be with my laptop too and i am going to try it on my PC to make sure.

Anaconda: Anaconda2-5.1.0-Windows-x86_64.exe.
This is the version found in the archive of the anaconda website. The latest version does not have py 2.7.
Do you recommend a certain version?

gias2: gias2-0.6.14-py3-none-any.whl (this is the latest version).
Do you recommend a certain version?

Opensim: 3.3.
Can i install a newer version?

mapclient: v0.15.0.rc.3 (latest version)
Do you recommend an earlier version (delta)?

Thanks,
Swithin

POST REPLY