Not possible to add a tool controller

Here's the place for discussion related to CAM/CNC and the development of the Path module.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
Wsk8
Posts: 182
Joined: Fri Dec 07, 2018 6:24 pm

Not possible to add a tool controller

Post by Wsk8 »

Hello,
i created a new Path Project. When in click "Add" to add a new tool controller, an error occurs.

Code: Select all

Traceback (most recent call last):
  File "C:\Users\p\Desktop\FreeCAD_0.19.18024_x64_LP_12.1.2_PY3QT5-WinVS2015\Mod\Path\PathScripts\PathJobGui.py", line 857, in toolControllerAdd
    PathToolLibraryManager.CommandToolLibraryEdit().edit(self.obj, self.updateToolController)
  File "C:\Users\p\Desktop\FreeCAD_0.19.18024_x64_LP_12.1.2_PY3QT5-WinVS2015\Mod\Path\PathScripts\PathToolLibraryManager.py", line 859, in edit
    editor = EditorPanel(job, cb)
  File "C:\Users\p\Desktop\FreeCAD_0.19.18024_x64_LP_12.1.2_PY3QT5-WinVS2015\Mod\Path\PathScripts\PathToolLibraryManager.py", line 521, in __init__
    self.TLM = ToolLibraryManager()
  File "C:\Users\p\Desktop\FreeCAD_0.19.18024_x64_LP_12.1.2_PY3QT5-WinVS2015\Mod\Path\PathScripts\PathToolLibraryManager.py", line 162, in __init__
    self.loadToolTables()
  File "C:\Users\p\Desktop\FreeCAD_0.19.18024_x64_LP_12.1.2_PY3QT5-WinVS2015\Mod\Path\PathScripts\PathToolLibraryManager.py", line 293, in loadToolTables
    prefsData = json.loads(self.prefs.GetString(self.PreferenceMainLibraryJSON, ""))
  File "C:\Users\p\Desktop\FreeCAD_0.19.18024_x64_LP_12.1.2_PY3QT5-WinVS2015\bin\lib\json\__init__.py", line 354, in loads
    return _default_decoder.decode(s)
  File "C:\Users\p\Desktop\FreeCAD_0.19.18024_x64_LP_12.1.2_PY3QT5-WinVS2015\bin\lib\json\decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "C:\Users\p\Desktop\FreeCAD_0.19.18024_x64_LP_12.1.2_PY3QT5-WinVS2015\bin\lib\json\decoder.py", line 357, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
OS: Windows 7 SP 1 (6.1)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18024 (Git)
Build type: Release
Branch: master
Hash: 9cc8f6eb666b0a0ae2dc256f7bc0beb8c987710c
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: German/Germany (de_DE)
User avatar
dubstar-04
Posts: 698
Joined: Mon Mar 04, 2013 8:41 pm
Location: Chester, UK
Contact:

Re: Not possible to add a tool controller

Post by dubstar-04 »

I've been doing a fair bit of work on the tooltable.

I will have a look at this error as soon as I can.

Can you create new tools through the tool table and then add them to the job?
User avatar
Wsk8
Posts: 182
Joined: Fri Dec 07, 2018 6:24 pm

Re: Not possible to add a tool controller

Post by Wsk8 »

I'm not able to start the tool controller at all.

mfg
User avatar
dubstar-04
Posts: 698
Joined: Mon Mar 04, 2013 8:41 pm
Location: Chester, UK
Contact:

Re: Not possible to add a tool controller

Post by dubstar-04 »

Wsk8 wrote: Sun Sep 08, 2019 8:28 pm I'm not able to start the tool controller at all.

mfg
If you have any, Please could you send me your tooltable data from the parameters editor?

I'm not at my machine but it's something like:

Tools menu-> Edit Parameters->BaseApp ->Preferences ->Mod ->Path
User avatar
Wsk8
Posts: 182
Joined: Fri Dec 07, 2018 6:24 pm

Re: Not possible to add a tool controller

Post by Wsk8 »

Could you be a bit more precise? I have no idea what to do...
mfg
chrisb
Veteran
Posts: 54288
Joined: Tue Mar 17, 2015 9:14 am

Re: Not possible to add a tool controller

Post by chrisb »

I don't have such an "Add" at all. In the tool manager I have a button "New Tool", opening a dialog, which has an Ok button. Further the tool manager himself has a button "Create Tool Controller(s)".
All of these work here.

OS: macOS High Sierra (10.13)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18095 (Git)
Build type: Release
Branch: master
Hash: 27cb54009b57c1938f7ff97026c8b35c1688233f
Python version: 3.7.3
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/Germany (en_DE)
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
dubstar-04
Posts: 698
Joined: Mon Mar 04, 2013 8:41 pm
Location: Chester, UK
Contact:

Re: Not possible to add a tool controller

Post by dubstar-04 »

Wsk8 wrote: Sun Sep 08, 2019 9:00 pm Could you be a bit more precise? I have no idea what to do...
mfg
I have managed to replicate the issue.

I will get it fixed as soon as I can.

As a workaround you should be able to create a tool in the tooltable from an older version of FreeCAD. The version you are using should then work.

I have only had 10 minutes to look at it but it seems the error happens when no parameter exists for the tool data in preferences.

Thank you for reporting the issue and I am sorry for any inconvenience.

Dan
User avatar
dubstar-04
Posts: 698
Joined: Mon Mar 04, 2013 8:41 pm
Location: Chester, UK
Contact:

Re: Not possible to add a tool controller

Post by dubstar-04 »

chrisb wrote: Sun Sep 08, 2019 10:37 pm I don't have such an "Add" at all. In the tool manager I have a button "New Tool", opening a dialog, which has an Ok button. Further the tool manager himself has a button "Create Tool Controller(s)".
All of these work here.

OS: macOS High Sierra (10.13)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18095 (Git)
Build type: Release
Branch: master
Hash: 27cb54009b57c1938f7ff97026c8b35c1688233f
Python version: 3.7.3
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/Germany (en_DE)

Hi Chris,

Thankyou for testing. It probably works ok for you because you already have tool data in your tool table.

Seems to error only if the tool table doesn't exist. I thought I had tested this before I pushed the code.

clearly not :oops:
User avatar
dubstar-04
Posts: 698
Joined: Mon Mar 04, 2013 8:41 pm
Location: Chester, UK
Contact:

Re: Not possible to add a tool controller

Post by dubstar-04 »

Wsk8 wrote: Sun Sep 08, 2019 6:59 pm Hello,
i created a new Path Project. When in click "Add" to add a new tool controller, an error occurs.
This PR should fix the issue: https://github.com/FreeCAD/FreeCAD/pull/2513

Thanks again for taking the time to report it.
User avatar
Wsk8
Posts: 182
Joined: Fri Dec 07, 2018 6:24 pm

Re: Not possible to add a tool controller

Post by Wsk8 »

I was just testing around with 0.19 to see new features and if it works correctly :D
So it was no problem for me. Thanks for your contribution. Will test it next weekend.

mfg
Post Reply