Draft snap broken in current master

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Draft snap broken in current master

Post by NormandC »

Yorik,

You may be aware already, but right now the snaps seem broken. With only the end point snap active, here's the report in the report view:

Code: Select all

<type 'exceptions.KeyError'>
Other snaps don't seem to produce an error in the report view, but none work.
User avatar
yorik
Founder
Posts: 13665
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Draft snap broken in current master

Post by yorik »

That's strange, all seems to work fine for me... Anyone else experiencing this?
No other message than that? Normally if it's a python error there should be a bit more info...
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Draft snap broken in current master

Post by NormandC »

I had previously deleted my ~/.FreeCAD and ~/.config/FreeCAD folders and forgotten to redirect errors in the console.

I still have problems with the current PPA package, the Draft snaps do not work. Here's the report view output while I attempt to pick a point to move an object using Draft Move, only center snap is active. This goes in an infinite loop until I cancel the command!

Code: Select all

Indiquez le point de départ :
debug: Snapper: invalid snap point: [[]]
<type 'exceptions.KeyError'>
Traceback (most recent call last):
  File "/usr/lib/freecad/Mod/Draft/DraftTools.py", line 1990, in action
    self.point,ctrlPoint,info = getPoint(self,arg)
  File "/usr/lib/freecad/Mod/Draft/DraftTools.py", line 135, in getPoint
    point = FreeCADGui.Snapper.snap(args["Position"],lastpoint=last,active=amod,constrain=cmod,noTracker=noTracker)
  File "/usr/lib/freecad/Mod/Draft/DraftSnap.py", line 347, in snap
    self.tracker.setMarker(self.mk[winner[1]])
KeyError: None
debug: Snapper: invalid snap point: [[]]
<type 'exceptions.KeyError'>
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Draft snap broken in current master

Post by NormandC »

I just compiled from current master, deleted my FreeCAD config and preferences. I get the same infinite loop error. :(
User avatar
yorik
Founder
Posts: 13665
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Draft snap broken in current master

Post by yorik »

Ah now I see where the error is... I'm committing a fix now (commit 01d5193), tell me if it worked...
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Draft snap broken in current master

Post by NormandC »

Sorry, no change. :|
User avatar
yorik
Founder
Posts: 13665
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Draft snap broken in current master

Post by yorik »

But you cannot possibly get the same error message?
ulrich1a
Veteran
Posts: 1957
Joined: Sun Jul 07, 2013 12:08 pm

Re: Draft snap broken in current master

Post by ulrich1a »

Draft snap in Dimensions do work for me now without the <type 'exceptions.KeyError'> message.

OS: Debian GNU/Linux 7.1 (wheezy)
Platform: 32-bit
Version: 0.14.2610 (Git)
Branch: master
Hash: cdea437e3714e6519058712eedf8305c20fdcd8b
Python version: 2.7.3
Qt version: 4.8.2
Coin version: 3.1.3
SoQt version: 1.5.0
OCC version: 6.6.0
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Draft snap broken in current master

Post by NormandC »

yorikvanhavre wrote:But you cannot possibly get the same error message?
Yes, I have the same exact message!

What the hell is going on?!? I can't use Draft snaps anymore, both on the PPA daily build package and compiled!
User avatar
yorik
Founder
Posts: 13665
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Draft snap broken in current master

Post by yorik »

This message:

Code: Select all

debug: Snapper: invalid snap point
has been removed from the source and therefore cannot appear anymore. If you still see it, it means that somehow, your draft WB isn't using the latest code... Now, how that can happen, I have no idea :?:
Can you paste the full message error again? Maybe there will be some clue...
Post Reply