This is a question about trying to use the Legify Macro from vecronic (https://github.com/vectronic/freecad-legify-macros).
I'm using the weekly dev build AppImage on Ubuntu 21.10, placing the legify-brick.FCMacro in ~/.local/share/FreeCAD/Macro/ and the accompanying Legify package in the same location (i.e. ...Macro/Legify/[stuff]).
When I try to execute the macro in FC, I get the error :
Code: Select all
<class 'ModuleNotFoundError'>: No module named 'Legify'
Traceback (most recent call last):
File "/home/ben/.local/share/FreeCAD/Macro/legify-brick.FCMacro", line 6, in <module>
from Legify.Dialog import *
<class 'ModuleNotFoundError'>: No module named 'Legify'
Code: Select all
# coding: UTF-8
from FreeCAD import Console, Gui
from PySide2.QtWidgets import QMessageBox
from PySide2.QtCore import Qt
from Legify.Dialog import *
Code: Select all
from .Legify.Dialog import *
Code: Select all
<class 'ImportError'>: attempted relative import with no known parent package
Traceback (most recent call last):
File "/home/ben/.local/share/FreeCAD/Macro/legify-brick.FCMacro", line 6, in <module>
from . Legify.Dialog import *
Ben