View Issue Details

IDProjectCategoryView StatusLast Update
0000598FreeCADBugpublic2012-02-10 13:33
Reporterms4py Assigned To 
Status closedResolutionfixed 
Fixed in Version0.13 
Summary0000598: New version treats some objects as immutable
DescriptionI'm getting the following error after upgrading to a new version (tested freecad-daily and a self compiled version from git).

 File "/home/marc/FreeCAD/Mod/spapper/spapperlibs/", line 341, in applyRule
    "RHS-Object '%s' collides with an object in the CWS. Retracting!\n")
  File "/home/marc/FreeCAD/Mod/spapper/spapperlibs/", line 168, in collisionManyMany2
    return do_calc(lambda x: collisionOneOne(x, check_union))
  File "/usr/lib/python2.6/", line 34, in __exit__
    self.gen.throw(type, value, traceback)
  File "/home/marc/FreeCAD/Mod/spapper/spapperlibs/", line 63, in union
    yield shapes[0]
  File "/home/marc/FreeCAD/Mod/spapper/spapperlibs/", line 168, in collisionManyMany2
    return do_calc(lambda x: collisionOneOne(x, check_union))
  File "/home/marc/FreeCAD/Mod/spapper/spapperlibs/", line 157, in do_calc
    if coll_fun(cws_o):
  File "/home/marc/FreeCAD/Mod/spapper/spapperlibs/", line 168, in <lambda>
    return do_calc(lambda x: collisionOneOne(x, check_union))
  File "/home/marc/FreeCAD/Mod/spapper/spapperlibs/", line 87, in collisionOneOne
    return one.Shape.common(other.Shape).Vertexes != []
ReferenceError: This object is immutable, you can not set any attribute or call a non const method

This bug was introduced in the last couple of weeks, because freecad-dev (0.13R4972) does not have this error.

The extra module in use is spapper ( but it shouldn't be related to this issue.
TagsNo tags attached.
FreeCAD Information



2012-02-10 09:40

administrator   ~0001628

Can you give me a short introduction how to use this module, please? Whatever I do I got some python errors or a message box pops up.

Indeed there were recently made some changes which fixed the 'Const' attribute in some of our XML descriptions for the Python wrapper classes. So, it was wrong in version 0.13R4972 and before and works now correctly. But apparently this caused some collateral damages to third party module which must be fixed there.

So, if you can give me some overview of how to use the module I can create a patch and send it to the project maintainer.

2012-02-10 10:48


example.tar.gz (Attachment missing)


2012-02-10 10:51

reporter   ~0001629

Last edited: 2012-02-10 10:51

I uploaded an example, here are the instructions:

1. open FreeCAD file
2. switch to spapper workbench
3. load rule (2. toolbar button to the right)
4. enable collision detection (checkbox in the spapper view)
5. apply rule (right toolbar button)

Now there is the error in the report view.

Thank you very much for your effort. Please send me the patch as well.


2012-02-10 13:33

administrator   ~0001631

I found that there were still a few missing Const attributes from some functions. This means that 3rd party code doesn't need to be patched.

It's fixed in SVN 5434 and will be available on PPA very soon.

Issue History

Date Modified Username Field Change
2012-02-09 18:57 ms4py New Issue
2012-02-10 09:40 wmayer Note Added: 0001628
2012-02-10 10:48 ms4py File Added: example.tar.gz
2012-02-10 10:51 ms4py Note Added: 0001629
2012-02-10 10:51 ms4py Note Edited: 0001629
2012-02-10 13:33 wmayer Note Added: 0001631
2012-02-10 13:33 wmayer Status new => closed
2012-02-10 13:33 wmayer Resolution open => fixed
2012-02-10 13:33 wmayer Fixed in Version => 0.13