Hi Guys
So I'm a new user to FreeCAD and CfdOF , and I wanted to run a quick simulation however I am encountering the following error when I run the simulation:
<class 'ImportError'>: cannot import name 'Plot' from 'freecad.plot' (C:\Users\Zee\AppData\Roaming\FreeCAD\Mod\Plot\freecad\plot\__init__.py)
I've tried googling a few solutions however I have not been able to solve the problem as yet.
I have installed the plot workbench via the addon manager, however when I do a dependency check I get the following errors:
"Checking dependencies...
System: Windows
Runtime: MinGW
OpenFOAM directory: C:\Program Files\ESI-OpenCFD\OpenFOAM\v2012
Paraview executable: C:/Program Files/ParaView 5.5.2-Qt5-Windows-64bit/bin/paraview.exe
Could not load Plot workbench
Please install it using Tools | Addon manager
gmsh executable: C:/Program Files/FreeCAD 0.19/bin/gmsh.exe"
The addon manager explicitly shows that I have the plot workbench installed but I guess this might not be the case.
cannot import name 'plot' from 'freecad.plot'
Moderator: oliveroxtoby
Forum rules
and Helpful information for the FEM forum
and Helpful information for the FEM forum
Re: cannot import name 'plot' from 'freecad.plot'
If you go to the workbench dropdown menu, does Plot show up there? If it doesn't, you might try reinstalling the plot workbench and/or restarting FreeCAD. You can also try opening the Plot workbench to make sure it loads (FreeCAD doesn't load all workbenches on startup to save system resources–it loads stuff when you try to use it).
- oliveroxtoby
- Posts: 840
- Joined: Fri Dec 23, 2016 9:43 am
- Location: South Africa
Re: cannot import name 'plot' from 'freecad.plot'
The problem here is that the plotting functionality has just been removed from the plot workbench (https://github.com/FreeCAD/freecad.plot/pull/16) since it was moved into the core for version 0.20. Unfortunately this had the effect of the breaking the plotting capability of CfdOF in FreeCAD 0.19, so I have copied the relevant file in to CfdOF as a backward compatibility measure. Hopefully if you update CfdOF you will find it is working now. Plot workbench no longer needed.zee111 wrote: ↑Wed Apr 20, 2022 7:14 am Hi Guys
So I'm a new user to FreeCAD and CfdOF :), and I wanted to run a quick simulation however I am encountering the following error when I run the simulation:
<class 'ImportError'>: cannot import name 'Plot' from 'freecad.plot' (C:\Users\Zee\AppData\Roaming\FreeCAD\Mod\Plot\freecad\plot\__init__.py)
Re: cannot import name 'plot' from 'freecad.plot'
Hi oliveroxtoby
Spot on. I've updated CfdOF and the simulation now runs perfectly
Thanks for all the help. I greatly appreciate it.
Spot on. I've updated CfdOF and the simulation now runs perfectly
Thanks for all the help. I greatly appreciate it.
Re: cannot import name 'plot' from 'freecad.plot'
Is there a way to make the user aware that Plot was moved to an external workbench through the error messages?
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
- oliveroxtoby
- Posts: 840
- Joined: Fri Dec 23, 2016 9:43 am
- Location: South Africa
Re: cannot import name 'plot' from 'freecad.plot'
It's actually the other way around - the plot machinery has been moved to the base code and out of the external workbench now. There should be no possibility of an error now as we have a copy of the module within CfdOF (for compatility with 0.19) and in 0.20 it is present in the base code.