Failure creating job using template [closed]

Here's the place for discussion related to CAM/CNC and the development of the Path module.
falviani
Posts: 123
Joined: Tue May 07, 2019 8:49 pm

Failure creating job using template [closed]

Postby falviani » Tue Apr 14, 2020 4:12 pm

Hi all,

OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.20477 (Git)
Build type: Release
Branch: master
Hash: 7d8ab175a68e476427e6e337fe3099b52da49dc8
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United States (en_US)

Having just learned (duh!) about exporting path job templates, I set one up using an existing job, exported it, then created a new project to test it. When I tried to create a job using my new template I got the following error:

Running the Python command 'Path_Job' failed:
Traceback (most recent call last):
File "E:\Downloads\3D Printer software installers etc\FreeCAD\FreeCAD_0.19.20477_x64_LP_12.1.2_PY3QT5-WinVS2015\FreeCAD_0.19.20477_x64_LP_12.1.2_PY3QT5-WinVS2015\Mod\Path\PathScripts\PathJobCmd.py", line 71, in Activated
self.Execute(models, dialog.getTemplate())
File "E:\Downloads\3D Printer software installers etc\FreeCAD\FreeCAD_0.19.20477_x64_LP_12.1.2_PY3QT5-WinVS2015\FreeCAD_0.19.20477_x64_LP_12.1.2_PY3QT5-WinVS2015\Mod\Path\PathScripts\PathJobCmd.py", line 81, in Execute
FreeCADGui.doCommand('PathScripts.PathJobGui.Create(%s, %s)' % ([o.Name for o in base], template))

("(unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \\UXXXXXXXX escape", ('<string>', 1, 40, None))

Is this a known error? If so, what did I do wrong, and how can I avoid it in the future?
The template is attached.

Thanks in advance,
Frank
Attachments
job_Stepover 50 - Copy.txt
(772 Bytes) Downloaded 18 times
Last edited by falviani on Wed Apr 15, 2020 7:50 pm, edited 1 time in total.
User avatar
dubstar-04
Posts: 626
Joined: Mon Mar 04, 2013 8:41 pm
Location: Chester, UK
Contact:

Re: Failure creating job using template

Postby dubstar-04 » Tue Apr 14, 2020 4:26 pm

Hi Frank,

Could you try saving the templates as a .json?

Thanks,

Dan
chrisb
Posts: 32055
Joined: Tue Mar 17, 2015 9:14 am

Re: Failure creating job using template

Postby chrisb » Tue Apr 14, 2020 5:16 pm

Did you give a fancy name to your template with german umlauts, french accents, spanish question marks or other non-ASCII characters?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
falviani
Posts: 123
Joined: Tue May 07, 2019 8:49 pm

Re: Failure creating job using template

Postby falviani » Tue Apr 14, 2020 6:16 pm

1) THe file IS a json file - I had to change the extension to be able to attach it. json is not acceptable (probably for security reasons, or the authors of the forum software never throught of it.) :D
2) I did NOT use any fancy characters - I'm too lazy for that, and only really speak English (my German from high school is 50 years obsolete). The name of the template was Stepover 50, as shown:
Job Template Usag.png
Job Template Usag.png (6.34 KiB) Viewed 527 times
Hopefully this helps
Frank
chrisb
Posts: 32055
Joined: Tue Mar 17, 2015 9:14 am

Re: Failure creating job using template

Postby chrisb » Tue Apr 14, 2020 10:23 pm

Could you give it another try without the space in the filename?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
falviani
Posts: 123
Joined: Tue May 07, 2019 8:49 pm

Re: Failure creating job using template

Postby falviani » Tue Apr 14, 2020 10:57 pm

Hi all,
Same FreeCad setup as before:

OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.20477 (Git)
Build type: Release
Branch: master
Hash: 7d8ab175a68e476427e6e337fe3099b52da49dc8
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United States (en_US)

Tried again. Reset values in the set up sheet. Exported to stepover_50. Same crash occurred in a new project when I tried to use the template.

Running the Python command 'Path_Job' failed:
Traceback (most recent call last):
File "E:\Downloads\3D Printer software installers etc\FreeCAD\FreeCAD_0.19.20477_x64_LP_12.1.2_PY3QT5-WinVS2015\FreeCAD_0.19.20477_x64_LP_12.1.2_PY3QT5-WinVS2015\Mod\Path\PathScripts\PathJobCmd.py", line 71, in Activated
self.Execute(models, dialog.getTemplate())
File "E:\Downloads\3D Printer software installers etc\FreeCAD\FreeCAD_0.19.20477_x64_LP_12.1.2_PY3QT5-WinVS2015\FreeCAD_0.19.20477_x64_LP_12.1.2_PY3QT5-WinVS2015\Mod\Path\PathScripts\PathJobCmd.py", line 81, in Execute
FreeCADGui.doCommand('PathScripts.PathJobGui.Create(%s, %s)' % ([o.Name for o in base], template))

("(unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \\UXXXXXXXX escape", ('<string>', 1, 40, None))

Note: For some of the checkboxes in the setup sheet mega dialog, if you check a box and then click next to it, a text box is brought up where you can enter text. This LOOKS like it's how you enter values, but I suspect it's doing something quite odd instead. None of the data entries in my set up have such text set. Might be worth looking into.

-Frank
chrisb
Posts: 32055
Joined: Tue Mar 17, 2015 9:14 am

Re: Failure creating job using template

Postby chrisb » Wed Apr 15, 2020 12:29 am

No problem here. I renamed your template to "job_Stepover50.json", created a cube 10x10x10 and used the template for the job.

OS: macOS High Sierra (10.13)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.20514 (Git)
Build type: Release
Branch: master
Hash: a05ffd499366ab12fa1b43f37db73f4f1e9c332d
Python version: 3.8.2
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.4.0
Locale: C/Default (C)
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
falviani
Posts: 123
Joined: Tue May 07, 2019 8:49 pm

Re: Failure creating job using template

Postby falviani » Wed Apr 15, 2020 1:00 am

1) Different OSs - MacOS vs Win10 - might be a factor. 2) You're on a more recent version than I am - the win10 version hasn't been updated in a number of days. I'll wait until it finally gets updated and try again.

Thanks for trying anyway...
chrisb
Posts: 32055
Joined: Tue Mar 17, 2015 9:14 am

Re: Failure creating job using template

Postby chrisb » Wed Apr 15, 2020 5:47 am

Try with the new version, although I don't think that things have changed in that area. If the problem persists,come back and we will find someone to reproduce.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
falviani
Posts: 123
Joined: Tue May 07, 2019 8:49 pm

Re: Failure creating job using template

Postby falviani » Wed Apr 15, 2020 2:09 pm

The Windows 10 version is the lone straggler, not updated yet. I'll keep checking...