View Issue Details

IDProjectCategoryView StatusLast Update
0001894FreeCADBugpublic2015-01-06 15:26
Reporterhobbes1069 Assigned Toyorik  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionno change required 
PlatformLinux x86_64OSFedoraOS Version20
Product Version0.14 
Summary0001894: DraftSnap.py:580:snapToPolar:AttributeError: 'module' object has no attribute 'OCCError'
DescriptionTruncated backtrace:
DraftSnap.py:580:snapToPolar:AttributeError: 'module' object has no attribute 'OCCError'

Traceback (most recent call last):
  File "/usr/lib64/freecad/Mod/Draft/DraftTools.py", line 491, in action
    self.point,ctrlPoint,info = getPoint(self,arg)
  File "/usr/lib64/freecad/Mod/Draft/DraftTools.py", line 131, in getPoint
    point = FreeCADGui.Snapper.snap(args["Position"],lastpoint=last,active=amod,constrain=cmod,noTracker=noTracker)
  File "/usr/lib64/freecad/Mod/Draft/DraftSnap.py", line 214, in snap
    point,eline = self.snapToPolar(point,lastpoint)
  File "/usr/lib64/freecad/Mod/Draft/DraftSnap.py", line 580, in snapToPolar
    except Part.OCCError:
AttributeError: 'module' object has no attribute 'OCCError'

Local variables in innermost frame:
a: 45
last: Vector (1.5585691937355612e+16, 15.703227819857185, 0.0)
point: Vector (1.5585691937355612e+16, 15.735724272188728, 0.0)
self: <DraftSnap.Snapper instance at 0x27454d0>
vecs: [Vector (1.0, 6.123233995736766e-17, 0.0), Vector (-1.0, -6.123233995736766e-17, -0.0), Vector (0.0, 1.0, 0.0), Vector (-0.0, -1.0, -0.0), Vector (0.7071067811865476, 0.7071067811865475, 0.0), Vector (-0.7071067811865476, -0.7071067811865475, -0.0), Vector (-0.7071067811865475, 0.7071067811865476, 0.0), Vector (0.7071067811865475, -0.7071067811865476, -0.0)]
v: Vector (1.0, 6.123233995736766e-17, 0.0)
ax: [Vector (1.0, 6.123233995736766e-17, 0.0), Vector (0.0, 1.0, 0.0), Vector (0.0, 0.0, 1.0)]
Additional Informationhttps://bugzilla.redhat.com/show_bug.cgi?id=1178672
TagsNo tags attached.
FreeCAD Information

Activities

shoogen

2015-01-06 12:20

developer   ~0005534

At first sight this looks like improper backporting. Can you please add the full FreeCAD Version information or a link to the source code used.

hobbes1069

2015-01-06 13:50

reporter   ~0005537

I'm starting with the official 0.14 release but I do have a few patches, the only one probably relevant is:
From 328bdcf6363f1107447858c2dd939ecae1005f47 Mon Sep 17 00:00:00 2001
From: Yorik van Havre <yorik@uncreated.net>
Date: Thu, 18 Sep 2014 19:39:37 -0300
Subject: [PATCH] Draft: small fix in trackers - fixes 0001757

which fixed another bug I opened. The only other significant patch is the smesh one I submitted which was merged.

shoogen

2015-01-06 14:05

developer   ~0005538

If you use the 0.14 release then you need to change "Part.OCCError" to "Exception"

yorik

2015-01-06 14:27

administrator   ~0005539

Hmm yes at some point in time, a series of specific exceptions where added to FreeCAD (such as this Part.OCCError), and several python modules such as Draft began to use them. But this happened after the 0.14 release...

Indeed, the solution is either to merge the commit that implements these errors (this will need a bit of search...) or simply like shoogen suggests, remove the references to these (you can also leave the "except" alone, simply:

try:
   ...
except:
   ....

hobbes1069

2015-01-06 14:33

reporter   ~0005540

Done. Thanks for the quick feedback!

Issue History

Date Modified Username Field Change
2015-01-05 14:03 hobbes1069 New Issue
2015-01-06 11:17 wmayer Assigned To => yorik
2015-01-06 11:17 wmayer Status new => assigned
2015-01-06 12:20 shoogen Note Added: 0005534
2015-01-06 13:50 hobbes1069 Note Added: 0005537
2015-01-06 14:05 shoogen Note Added: 0005538
2015-01-06 14:27 yorik Note Added: 0005539
2015-01-06 14:33 hobbes1069 Note Added: 0005540
2015-01-06 15:25 shoogen Status assigned => resolved
2015-01-06 15:25 shoogen Resolution open => no change required
2015-01-06 15:26 shoogen Status resolved => closed