No module named DraftLayer

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
abdullah
Posts: 3174
Joined: Sun May 04, 2014 3:16 pm

No module named DraftLayer

Postby abdullah » Fri Jun 07, 2019 3:38 pm

I am having a problem when loading a file in FreeCAD with error (repeated several times):

Code: Select all

Traceback (most recent call last):
  File "/usr/share/freecad-daily/Mod/Draft/Draft.py", line 74, in <module>
    import DraftLayer
<class 'ModuleNotFoundError'>: No module named 'DraftLayer'
The FreeCAD version:

Code: Select all

OS: Ubuntu 18.04.2 LTS (GNOME-Flashback:GNOME/gnome-flashback-metacity)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.
Build type: Release
Python version: 3.6.7
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
I see no problem in the file after loading it. It is 12 Mb, so the reasons for not having uploaded it.

The question is: why I see this message?
User avatar
yorik
Site Admin
Posts: 11547
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

Re: No module named DraftLayer

Postby yorik » Fri Jun 07, 2019 3:53 pm

Same problem in https://forum.freecadweb.org/viewtopic.php?f=10&t=36888
The DraftLayer.py file is new, but on the FreeCAD side everything is OK, it's there in cmake... I don't understand why it's not in the PPA, is there a list of files that needs to be updated manually?
abdullah
Posts: 3174
Joined: Sun May 04, 2014 3:16 pm

Re: No module named DraftLayer

Postby abdullah » Fri Jun 07, 2019 4:12 pm

yorik wrote:
Fri Jun 07, 2019 3:53 pm
Same problem
For some reason, all my Draft Clones have been converted into normal objects. I did not realise of this before. May this be related?

I confirm that I have upgraded the freecad-daily package today. I also confirm that DraftLayer.py does not exist in my freecad-daily directory in /usr/share.

As far as I see the inclusion in CMakeList.txt is ok.
User avatar
yorik
Site Admin
Posts: 11547
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

Re: No module named DraftLayer

Postby yorik » Sun Jun 09, 2019 5:59 pm

abdullah wrote:
Fri Jun 07, 2019 4:12 pm
For some reason, all my Draft Clones have been converted into normal objects. I did not realise of this before. May this be related?
Probably yes.. If the Draft module failed to import because of the missing dependency, that's also where all the Draft objects are defined...