Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Work bench fails to launch #63

Closed
Jsevenh opened this issue Oct 13, 2023 · 13 comments
Closed

Work bench fails to launch #63

Jsevenh opened this issue Oct 13, 2023 · 13 comments
Assignees
Labels
bug Something isn't working

Comments

@Jsevenh
Copy link

Jsevenh commented Oct 13, 2023

rocket work bench version 3.2.1 master branch
Screenshot from 2023-10-13 09-26-49
I'm getting the above error while loading the workbench on freecad version 0.21.1
This is the report view output
// report view
09:26:21 No module named 'PySide2.QtCharts'
09:26:21 Traceback (most recent call last):
File "<"string">", line 49, in Initialize
File "$HOME/snap/freecad/common/Mod/Rocket/./RocketGui.py", line 59, in
from Ui.Commands.CmdFlutterAnalysis import CmdFinFlutter
File "$HOME/snap/freecad/common/Mod/Rocket/./Ui/Commands/CmdFlutterAnalysis.py", line 34, in
from Ui.DialogFinFlutter import DialogFinFlutter
File "$HOME/snap/freecad/common/Mod/Rocket/./Ui/DialogFinFlutter.py", line 35, in
from PySide2.QtCharts import QtCharts

@davesrocketshop
Copy link
Owner

Due to licensing issues, the dependency is not automatically included in the Linux versions of FreeCAD. I'll be removing this dependency in a future release.

In the meantime you can manually add it to your system. On ubuntu and likely most Debian derived systems you can do this with:

$ sudo apt install python3-pyqt5.qtchart

@davesrocketshop davesrocketshop self-assigned this Oct 13, 2023
@Jsevenh
Copy link
Author

Jsevenh commented Oct 13, 2023

Thank you for your response. In addition to your suggestion of using 'sudo apt install python3-pyqt5.qtchart,' I've also attempted to resolve the issue by running 'pip install PySide2.' Unfortunately, I'm still encountering the same error.

@davesrocketshop
Copy link
Owner

Well, let's start from the beginning. From the FreeCAD menu bar, select "Help"->"About FreeCAD". The dialog will show some information, including a button saying "Copy to clipboard". Push the button, and then paste here

@Jsevenh
Copy link
Author

Jsevenh commented Oct 14, 2023

Well, let's start from the beginning. From the FreeCAD menu bar, select "Help"->"About FreeCAD". The dialog will show some information, including a button saying "Copy to clipboard". Push the button, and then paste here

[code]
OS: Ubuntu Core 20 (ubuntu:GNOME/ubuntu)
Word size of FreeCAD: 64-bit
Version: 0.21.1.33668 +26 (Git) Snap 759
Build type: Release
Branch: tag: 0.21.1
Hash: f6708547a9bb3f71a4aaade12109f511a72c207c
Python 3.8.10, Qt 5.15.7, Coin 4.0.0, Vtk 7.1.1, OCC 7.6.3
Locale: English/United States (en_US)
Installed mods:

  • Rocket 3.2.1
  • A2plus 0.4.60n
  • Beltrami 1.0.8-alpha
  • CfdOF 1.24.5
  • lattice2 1.0.0
  • fasteners 0.4.66
  • Plot 2022.4.17
  • Curves 0.6.13
    [/code]

@davesrocketshop
Copy link
Owner

Ok, problem identified.

You're running FreeCAD from a snap. The key feature of the snap is that the program is packaged with its own dependencies, meaning it's not reliant on the packages installed by the OS. The other side of that coin is that installing missing packages on your OS will not be seen by the snap. So we're all out of luck there.

Plan B is to remove flutter analysis, and that will involve editing some lines of code. in the file ~/.local/share/FreeCAD/Mod/Rocket/Ui/Commands/CmdFlutterAnalysis.py you'll have to change lines 34-48 to look like this:

# from Ui.DialogFinFlutter import DialogFinFlutter
from Ui.Commands.Command import Command

 def calcFinFlutter():

    # See if we have a fin selected
    for fin in FreeCADGui.Selection.getSelection():
        if fin.isDerivedFrom('Part::FeaturePython'):
            if hasattr(fin,"FinType"):
                # try:
                #     form = DialogFinFlutter(fin)
                #     form.exec_()
                # except TypeError as ex:
                #     QtGui.QMessageBox.information(None, "", str(ex))
                return

Unfortunately it's a bit of a project to replace this code and it's going to be a while before I can get to it.

@davesrocketshop davesrocketshop added the bug Something isn't working label Oct 14, 2023
@Jsevenh
Copy link
Author

Jsevenh commented Oct 14, 2023

Thanks , I really appreciate the help .

@Jsevenh
Copy link
Author

Jsevenh commented Oct 14, 2023

While this may not pertain to the current topic, I'd like to inquire about the most effective approach for initiating workbench development.

@davesrocketshop
Copy link
Owner

I've just created a new release that handles the missing QtCharts module more gracefully. You still won't be able to use the flutter analysis dialog without it, but all other functionality will be unaffected.

@davesrocketshop
Copy link
Owner

While this may not pertain to the current topic, I'd like to inquire about the most effective approach for initiating workbench development.

Start here:
https://wiki.freecad.org/Workbench_creation

Good ways to communicate more interactively are through twitter @davesrocketshop ro via the FreeCAD discord channel

@Jsevenh Jsevenh closed this as completed Oct 14, 2023
@Jsevenh Jsevenh reopened this Oct 14, 2023
@Jsevenh
Copy link
Author

Jsevenh commented Oct 14, 2023

Thanks ,

@davesrocketshop
Copy link
Owner

I'm going to leave this issue open. The last release allows for graceful failure, but it is still failure not a fix.

The fix is to remove the requirement for QtCharts

@davesrocketshop
Copy link
Owner

Fixed in v3.2.3.

The dependence on QtCharts has been removed, and the flutter dialog uses matplotlib instead. This package is part of the FreeCAD install and should be available on all supported platforms.

You should have full functionality with no need for any work arounds.

@Jsevenh
Copy link
Author

Jsevenh commented Oct 15, 2023

Your efforts are greatly appreciated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants