jaheyns / CfdOF

Computational Fluid Dynamics (CFD) for FreeCAD based on OpenFOAM solver
GNU Lesser General Public License v3.0
449 stars 85 forks source link

No module named 'freecad.plot' #16

Closed numenic closed 5 years ago

numenic commented 5 years ago

Software Context

Freecad was installed via conda: conda create -n freecad freecad -c conda-forge

Freecad about:

OS: Ubuntu 18.10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.14555 (Git shallow)
Build type: Release
Branch: (HEAD detached at 2ea4c6a)
Hash: 2ea4c6a81a6449b6880f8a757d0298dd889e0630
Python version: 3.7.1
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: French/Switzerland (fr_CH)

cfdOF Dependancies

Dependency checker output:

Checking dependencies...
No missing dependencies detected

Bug Occuring

Performing first tutorial (elbow), everythong works fine until Page 22 (Write the case to a directory). Clicking on the "Edit Properties and run solver" green arrow button raises the following stacktrace:

Traceback (most recent call last):
  File "/home/nic/.FreeCAD/Mod/CfdOF/_ViewProviderCfdSolverFoam.py", line 81, in setEdit
    from CfdRunnableFoam import CfdRunnableFoam
  File "/home/nic/.FreeCAD/Mod/CfdOF/CfdRunnableFoam.py", line 44, in <module>
    from CfdResidualPlot import ResidualPlot
  File "/home/nic/.FreeCAD/Mod/CfdOF/CfdResidualPlot.py", line 30, in <module>
    from freecad.plot import Plot
<class 'ModuleNotFoundError'>: No module named 'freecad.plot'

[edit] No bug detected using freecad-daily

The Bug does not affect Freecad-daily

OS: Ubuntu 18.10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.16093 (Git)
Build type: Release
Branch: releases/FreeCAD-0-18
Hash: 690774c0effe4fd7b8d2b5e2fb2b8c8d145e21ce
Python version: 2.7.15+
Qt version: 5.11.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: French/Switzerland (fr_CH)
luzpaz commented 5 years ago

@looooo may be able to help with this

looooo commented 5 years ago

using pip:
~pip install https://github.com/FreeCAD/freecad.plot.git~ pip install https://github.com/FreeCAD/freecad.plot/archive/master.zip

also the addonmanager should work, but it's not listed yet.

edit: wrong adress.

numenic commented 5 years ago

yep! pip install git+https://github.com/FreeCAD/freecad.plot.git made the job.

Should I close the issue or you guys need to do it?

looooo commented 5 years ago

Didn't know about this option... Yes, feel free to close the issue. Maybe @luzpaz can open an issue to add freecad.plot and freecad.ship to the addon-manager.

oliveroxtoby commented 5 years ago

@looooo , I was under the impression that Plot is one of the core workbenches of FreeCAD, rather than an Add-on. If this is true then this issue would seem to be a packaging mistake of some sort?

looooo commented 5 years ago

Basically it was an experiment to externalize the plot / ship modules. I thought about replacing the internal modules, but I think keeping them outside the FreeCAD-source is better.

How to solve 3rd-party cross-dependencies, I don't know. I guess such things will occur sooner or later.

Btw.: for python-only libraries pip is maybe the best option.

numenic commented 5 years ago

Closed (cf https://github.com/jaheyns/CfdOF/issues/16#issuecomment-481280789)

oliveroxtoby commented 5 years ago

Thanks @looooo , that's good to know. I did not realise this had become a non-core dependency, so I will update our docs accordingly. There is a space to specify 3rd party dependencies in the addon manager's metadata, though I don't think it is used as yet.