Code Restructuring - JobFixer Script

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!
Russ4262
Posts: 941
Joined: Sat Jun 30, 2018 3:22 pm
Location: Oklahoma
Contact:

Code Restructuring - JobFixer Script

Post by Russ4262 »

Good day FreeCAD users.
On 23 September 2022, mlampert posted a heads-up about a pending code restructuring. Since the 12 Oct. 2022 merger of that giant step forward for the Path workbench, users have been wanting to recover previous Path workbench projectcs that used the old code structure. To this need, sliptonic posted on 13 November 2022 a python script to assist with migrating project files created with pre-restucturing versions of FC to the newly restructured version we currently have. Since then, a few more contributions to that script have been made to improve the results and usability.

This thread is dedicated to that helpful JobFixer script, and those who would like to use it. Updated versions of the script will be attached to this original post.

The latest script is version 9, updated on 24 September 2023, and attached below.

Cheers,
Russell

EDIT 2023-07-21: Update to version 8, with 58 downloads of V7 from 19 March 2023.
EDIT 2023-09-24: Update to version 9, with 45 downloads of V8 from 21 July 2023.

Code: Select all

OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.21.0.32198 (Git)
Build type: Release
Branch: master
Hash: f51b2156f35399cab38eef1e957a59ad5a11de66
Python 3.8.16, Qt 5.15.6, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.3
Locale: English/United States (en_US)
Installed mods: 
  * FC_SU
  * freecad.gears 1.0.0
  * PathExp
  * Z_MacroStartup
Attachments
JobFixer_V9.zip
Version 9 of the JobFixer script and Windows helper script as .bat file.
(4.33 KiB) Downloaded 120 times
Last edited by Russ4262 on Sun Sep 24, 2023 1:54 pm, edited 2 times in total.
memfis
Posts: 586
Joined: Tue Nov 15, 2016 7:58 pm

Re: Code Restructuring - JobFixer Script

Post by memfis »

Colleagues, there is a problem with the script. When it appears - if there are pictures in the project file (Image workbench), then after applying the script, it is impossible to save any changes in the file, the following error pops up

PropertyFileIncluded::SaveDocFile(): File '/home/user/.cache/FreeCAD/Cache/FreeCAD_Doc_f54bd16f-ba17-4367-a9d4-ac4dea565601_91ee46_961635/кроншт.jpg' in transient directory doesn't exist.
цуа.jpg
цуа.jpg (378.77 KiB) Viewed 18376 times

At the same time in the cache, the desired picture file is there, the only problem is where this file is looking for itself FC
Russ4262
Posts: 941
Joined: Sat Jun 30, 2018 3:22 pm
Location: Oklahoma
Contact:

Re: Code Restructuring - JobFixer Script

Post by Russ4262 »

memfis wrote: Sat Jul 08, 2023 8:26 am Colleagues, there is a problem with the script. When it appears - if there are pictures in the project file (Image workbench), then after applying the script, it is impossible to save any changes in the file, the following error pops up ...
Morning,
Do you have a sample file with which to experiment and experience the error?

Thanks,
Russell
memfis
Posts: 586
Joined: Tue Nov 15, 2016 7:58 pm

Re: Code Restructuring - JobFixer Script

Post by memfis »

.
Attachments
2.jpg
2.jpg (57.05 KiB) Viewed 17538 times
1.jpg
1.jpg (7.08 KiB) Viewed 17538 times
chrisb
Veteran
Posts: 53921
Joined: Tue Mar 17, 2015 9:14 am

Re: Code Restructuring - JobFixer Script

Post by chrisb »

The problem is not the number of files in your mailbox, but the size of the file itself. Can you simplify it and still get the issue?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
memfis
Posts: 586
Joined: Tue Nov 15, 2016 7:58 pm

Re: Code Restructuring - JobFixer Script

Post by memfis »

Oh. Your hypothesis is not correct. My mailbox doesn't have, never was and never will have any restrictions - it's mine and I have full control over it. Moreover, the question about non-existent problems of my mailbox has never been raised. But the forum engine does not allow me to post a file with FCSTD extension weighing even 1.5mb. What was reported by screenshots - in order to fix the identified script error I was asked to provide a file with an example. I agreed to provide such a file in a private message through the forum "engine" and offered the way of file transfer - by adult e-mail, not by teenager messages of the forum with its censorship. And in response, as often happens, silence. After a couple days of waiting I posted screenshots in the forum.
перевод от deepl мог исказить тональность, но сущность передал верно.
chrisb
Veteran
Posts: 53921
Joined: Tue Mar 17, 2015 9:14 am

Re: Code Restructuring - JobFixer Script

Post by chrisb »

memfis wrote: Mon Jul 17, 2023 7:28 pm Your hypothesis is not correct.

But the forum engine does not allow me to post a file with FCSTD extension weighing even 1.5mb.
That’s just what I meant. The size limit is 1 MB I think.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
memfis
Posts: 586
Joined: Tue Nov 15, 2016 7:58 pm

Re: Code Restructuring - JobFixer Script

Post by memfis »

:)
Would you agree that the situation is solved simply by using adult email to forward the file to research the problem?

After all, the problem is in the file created in the "old version" and this file already contains all the problems needed for research. It can be opened, edited and saved only in the "modern" version, which destroys the possibility of research.

The argument, of course, is about nothing.
memfis
Posts: 586
Joined: Tue Nov 15, 2016 7:58 pm

Re: Code Restructuring - JobFixer Script

Post by memfis »

.
Attachments
e2_error.FCStd
(97.62 KiB) Downloaded 74 times
111.jpg
111.jpg (289.04 KiB) Viewed 16714 times
e2.FCStd
(145.67 KiB) Downloaded 68 times
User avatar
onekk
Veteran
Posts: 6144
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: Code Restructuring - JobFixer Script

Post by onekk »

memfis wrote: Tue Jul 18, 2023 8:43 am :)
Would you agree that the situation is solved simply by using adult email to forward the file to research the problem?
...
Not exacly as it is a limitation of "forum email system", that has some good reasons to exist, as example it is supplied to every forum user "for free" and is taylored to simple message exchange, so someone has to pay for the host, so some "metering" is an "usual practice".

There is in many forums a request for MWE "Minimal Working Example" to show problems, and if such a thing is not supplied, you will not receive nothing, not even a "your post lack of a MWE" as it is "their politics", here we are less strict in enforcing rules.

For more complex things, there is another "usual practice" to post it on some cloud system were an user could download it.

To not forgot also that here, every help is made "for free" by volunteer, so probably if "helper" time is scarce (Russ4262 is one of the developers of Path WB) "time to answer" could be not so blazing fast, but considering how much you payed for service (0 whatever currency you use) probably service is worth the price.

But even this fact is often not taken in account by users, that usually want their problem solved in "no time", we "helpers" are also users so we know that.

Regards

Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
Post Reply