Animation WB Not Installing/Loading

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
pointdee
Posts: 15
Joined: Wed Oct 24, 2018 8:36 pm

Animation WB Not Installing/Loading

Post by pointdee »

I have a clean install of FreeCAD as below on a clean install of openSUSE Leap. I have used the Addon manager to install several additional workbenches all of which seem to be ok except the animation workbench which is not loading. Addon manager shows it as being installed and the files are present in ~/.FreeCAD/Mod/animation, however it is not listed in the Workbench dropdown menu and files I have previously created using the animation WB no longer work

Does anyone have an idea where to look next (missing python library maybe?)

Thanks

OS: openSUSE Leap 15.1
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.Unknown
Build type: Release
Python version: 3.6.5
Qt version: 5.9.7
Coin version: 3.1.3
OCC version: 7.3.0
Locale: English/UnitedKingdom (en_GB)
chrisb
Veteran
Posts: 53919
Joined: Tue Mar 17, 2015 9:14 am

Re: Animation WB Not Installing/Loading

Post by chrisb »

Check report view. I think Animation WB has a problem with Qt5.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
microelly2
Veteran
Posts: 4688
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: Animation WB Not Installing/Loading

Post by microelly2 »

I need more information what goes wrong.
In my environment it still works fine:

OS: Ubuntu 14.04.6 LTS (Unity/ubuntu)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18403 (Git) AppImage
Build type: Release
Branch: master
Hash: 0717b4fc23ef1db70964c3977d25e2fe46a739d1
Python version: 3.7.3
Qt version: 5.12.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: German/Germany (de_DE)
chrisb
Veteran
Posts: 53919
Joined: Tue Mar 17, 2015 9:14 am

Re: Animation WB Not Installing/Loading

Post by chrisb »

What do you need?

I get after starting Freecad in report view the message

Code: Select all

During initialization the error "'backend.qt4 is not a valid rc parameter (see rcParams.keys() for a list of valid parameters)'" occurred in /Users/cb/Library/Preferences/FreeCAD/Mod/animation/InitGui.py
Please look into the log file for further information
If I load a model using Animation WB (from a post in the german forum) I get

Code: Select all

Traceback (most recent call last):
  File "/Users/cb/Library/Preferences/FreeCAD/Mod/animation/Animation.py", line 30, in <module>
    matplotlib.rcParams['backend.qt4']='PySide'
  File "/Users/cb/Desktop/FreeCAD.app/Contents/Resources/lib/python3.7/site-packages/matplotlib/__init__.py", line 808, in __setitem__
    f"{key} is not a valid rc parameter (see rcParams.keys() for "
<class 'KeyError'>: 'backend.qt4 is not a valid rc parameter (see rcParams.keys() for a list of valid parameters)'
Traceback (most recent call last):
  File "/Users/cb/Library/Preferences/FreeCAD/Mod/animation/Animation.py", line 30, in <module>
    matplotlib.rcParams['backend.qt4']='PySide'
  File "/Users/cb/Desktop/FreeCAD.app/Contents/Resources/lib/python3.7/site-packages/matplotlib/__init__.py", line 808, in __setitem__
    f"{key} is not a valid rc parameter (see rcParams.keys() for "
<class 'KeyError'>: 'backend.qt4 is not a valid rc parameter (see rcParams.keys() for a list of valid parameters)'
Traceback (most recent call last):
  File "/Users/cb/Library/Preferences/FreeCAD/Mod/animation/Animation.py", line 30, in <module>
    matplotlib.rcParams['backend.qt4']='PySide'
  File "/Users/cb/Desktop/FreeCAD.app/Contents/Resources/lib/python3.7/site-packages/matplotlib/__init__.py", line 808, in __setitem__
    f"{key} is not a valid rc parameter (see rcParams.keys() for "
<class 'KeyError'>: 'backend.qt4 is not a valid rc parameter (see rcParams.keys() for a list of valid parameters)'
Traceback (most recent call last):
  File "/Users/cb/Library/Preferences/FreeCAD/Mod/animation/Animation.py", line 30, in <module>
    matplotlib.rcParams['backend.qt4']='PySide'
  File "/Users/cb/Desktop/FreeCAD.app/Contents/Resources/lib/python3.7/site-packages/matplotlib/__init__.py", line 808, in __setitem__
    f"{key} is not a valid rc parameter (see rcParams.keys() for "
<class 'KeyError'>: 'backend.qt4 is not a valid rc parameter (see rcParams.keys() for a list of valid parameters)'
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
microelly2
Veteran
Posts: 4688
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: Animation WB Not Installing/Loading

Post by microelly2 »

chrisb wrote: Mon Nov 11, 2019 6:18 pm I get after starting Freecad in report view the message
I got the same some days ago, I will find the places in code and delete the matplotlib functionality.
pointdee
Posts: 15
Joined: Wed Oct 24, 2018 8:36 pm

Re: Animation WB Not Installing/Loading

Post by pointdee »

In Report View I have "During initialization the error No module named 'matplotlib' occurred in /home/user/.FreeCAD/Mod/animation/InitGui.py
Please look into the log file for further information"

I have python2-matplotlib installed but there are also python2-matplotlib-qt4 and python2-matplotlib-qt5 available. There are also all 3 available for python3

Are any of these likeky to work or do I need to wait for the update with matplotlib removed?
pointdee
Posts: 15
Joined: Wed Oct 24, 2018 8:36 pm

Re: Animation WB Not Installing/Loading

Post by pointdee »

To answer my own question I installed python3-matplotlib and whatever dependencies this has and the Animation WB now loads and seems to work ok (at least with my simple animations)

Thanks
duncandoo
Posts: 5
Joined: Mon Jan 27, 2020 7:22 pm

Re: Animation WB Not Installing/Loading

Post by duncandoo »

Sorry if I'm a bit late to this thread. I've got the same message as chrisb:

Code: Select all

During initialization the error "'backend.qt4 is not a valid rc parameter (see rcParams.keys() for a list of valid parameters)'" occurred in /Users/cb/Library/Preferences/FreeCAD/Mod/animation/InitGui.py
Please look into the log file for further information
I followed the same solution as on the github issue: https://github.com/microelly2/Animation/issues/35

By commenting out line 30 in animation.py

Code: Select all

# matplotlib.rcParams['backend.qt4']='PySide'
the message is gone.

The remaining question is whether this line is doing anything useful, or rather what functionality could be broken by not having it? I haven't been able to find anything broken by doing this, but happy to test if anyone can suggest anything. Or does it break things for other OS's (I only have MacOS)?
User avatar
microelly2
Veteran
Posts: 4688
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: Animation WB Not Installing/Loading

Post by microelly2 »

duncandoo wrote: Sat Feb 08, 2020 11:18 am
The remaining question is whether this line is doing anything useful, or rather what functionality could be broken by not having it? I haven't been able to find anything broken by doing this, but happy to test if anyone can suggest anything. Or does it break things for other OS's (I only have MacOS)?
I think we can remove matplotlib functionality from animation wb.
To display information of the tracks can be done with other tools.
I will delete the code from the project.
Post Reply