[BUG?] FreeCAD 0.19 - Draft WB - Wrong number or type of arguments for overloaded function 'SoMFString_setValue'.

A forum dedicated to the Draft, Arch and BIM workbenches development.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
icewalker
Posts: 2
Joined: Thu Aug 05, 2021 3:34 am

[BUG?] FreeCAD 0.19 - Draft WB - Wrong number or type of arguments for overloaded function 'SoMFString_setValue'.

Post by icewalker »

After upgrading to FreeCAD 0.19 I cannot get any tools working from the Draft WB.

Not able to assess where is yhe issue, (too) old Python lib maybe, something else... Any help will be much appreciated.
Note: these issues where not present with the previous freeCAD 0.18.x version I was using (which disappeared after the update).

  • Have installed the 'freecad' package using 'apt' from the stable repository (reference at the bottom of this post).
  • Regarding the python lib/pip, I do not know how to update them.
  • I have both python 2.7.17 and 3.6.9 installed.

When loading the Draft WB I get the following report:

Code: Select all

04:58:06  Persistent toolbars: Snapper toolbar not managed.
04:58:06  Wrong number or type of arguments for overloaded function 'SoMFString_setValue'.
  Possible C/C++ prototypes are:
    SoMFString::setValue(SbString const &)
    SoMFString::setValue(char const *)
    SoMFString::setValue(SoMFString const *)

04:58:06  Traceback (most recent call last):
  File "<string>", line 132, in Activated
  File "/usr/share/freecad/Mod/Draft/draftguitools/gui_snapper.py", line 1635, in show
    self.setTrackers()
  File "/usr/share/freecad/Mod/Draft/draftguitools/gui_snapper.py", line 1679, in setTrackers
    self.grid = trackers.gridTracker()
  File "/usr/share/freecad/Mod/Draft/draftguitools/gui_trackers.py", line 1039, in __init__
    self.reset()
  File "/usr/share/freecad/Mod/Draft/draftguitools/gui_trackers.py", line 1174, in reset
    self.update()
  File "/usr/share/freecad/Mod/Draft/draftguitools/gui_trackers.py", line 1104, in update
    self.text1.string = txt
  File "/usr/lib/python2.7/dist-packages/pivy/coin.py", line 4756, in __setattr__
    field.setValue(value)
  File "/usr/lib/python2.7/dist-packages/pivy/coin.py", line 32027, in setValue
    return _coin.SoMFString_setValue(self, *args)
When I try the ShapeString by clicking on the 'S' icon once the WB is loaded (anyhow with the 'pivy' bug trace), the following is reported:

Code: Select all

05:38:03  Running the Python command 'Draft_ShapeString' failed:
Traceback (most recent call last):
  File "/usr/share/freecad/Mod/Draft/draftguitools/gui_shapestrings.py", line 75, in Activated
    super(ShapeString, self).Activated(name)
  File "/usr/share/freecad/Mod/Draft/draftguitools/gui_base_original.py", line 290, in Activated
    super(Creator, self).Activated(name, noplanesetup)
  File "/usr/share/freecad/Mod/Draft/draftguitools/gui_base_original.py", line 154, in Activated
    Gui.Snapper.setTrackers()
  File "/usr/share/freecad/Mod/Draft/draftguitools/gui_snapper.py", line 1679, in setTrackers
    self.grid = trackers.gridTracker()
  File "/usr/share/freecad/Mod/Draft/draftguitools/gui_trackers.py", line 1039, in __init__
    self.reset()
  File "/usr/share/freecad/Mod/Draft/draftguitools/gui_trackers.py", line 1174, in reset
    self.update()
  File "/usr/share/freecad/Mod/Draft/draftguitools/gui_trackers.py", line 1104, in update
    self.text1.string = txt
  File "/usr/lib/python2.7/dist-packages/pivy/coin.py", line 4756, in __setattr__
    field.setValue(value)
  File "/usr/lib/python2.7/dist-packages/pivy/coin.py", line 32027, in setValue
    return _coin.SoMFString_setValue(self, *args)

Wrong number or type of arguments for overloaded function 'SoMFString_setValue'.
  Possible C/C++ prototypes are:
    SoMFString::setValue(SbString const &)
    SoMFString::setValue(char const *)
    SoMFString::setValue(SoMFString const *)
When I try the Line tool, the following is reported:

Code: Select all

Running the Python command 'Draft_Line' failed:
Traceback (most recent call last):
  File "/usr/share/freecad/Mod/Draft/draftguitools/gui_lines.py", line 69, in Activated
    super(Line, self).Activated(name)
  File "/usr/share/freecad/Mod/Draft/draftguitools/gui_base_original.py", line 290, in Activated
    super(Creator, self).Activated(name, noplanesetup)
  File "/usr/share/freecad/Mod/Draft/draftguitools/gui_base_original.py", line 117, in Activated
    App.activeDraftCommand.finish()
  File "/usr/share/freecad/Mod/Draft/draftguitools/gui_lines.py", line 141, in finish
    if self.oldWP:

'Line' object has no attribute 'oldWP'

Currently installed 'freecad' version, OS and libs from the 'About' popup:

Code: Select all

OS: Ubuntu 18.04.5 LTS (i3/i3)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.
Build type: Release
Branch: unknown
Hash: 7a9aa7edf2f44e3eb6a8e3e61c753368496b1399
Python version: 2.7.17
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.5.2
Locale: English/UnitedStates (en_US)
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: [BUG?] FreeCAD 0.19 - Draft WB - Wrong number or type of arguments for overloaded function 'SoMFString_setValue'.

Post by Kunda1 »

Looks like a packaging issues. Try using the AppImage and report back if you can recreate the issues.
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
icewalker
Posts: 2
Joined: Thu Aug 05, 2021 3:34 am

Re: [BUG?] FreeCAD 0.19 - Draft WB - Wrong number or type of arguments for overloaded function 'SoMFString_setValue'.

Post by icewalker »

Tested with FreeCAD_0.19-24291-Linux-Conda_glibc2.12-x86_64.AppImage
ShapeString creation, conversion to Sketch and pocket'ng are possible again.
Tried to fix the packaging issue to get back to the more repository related usage (which is a personal preference), so far without success.
Thank you Kunda1!
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: [BUG?] FreeCAD 0.19 - Draft WB - Wrong number or type of arguments for overloaded function 'SoMFString_setValue'.

Post by Kunda1 »

Glad to hear the workaround worked.
icewalker wrote: Sun Aug 29, 2021 12:37 pm Tried to fix the packaging issue to get back to the more repository related usage (which is a personal preference), so far without success.
It may have something to do with your Qt version.
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
paullee
Veteran
Posts: 5135
Joined: Wed May 04, 2016 3:58 pm

Re: [BUG?] FreeCAD 0.19 - Draft WB - Wrong number or type of arguments for overloaded function 'SoMFString_setValue'.

Post by paullee »

I use AppImage also and not any more using the Fedora version :)
Post Reply