-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when saving file with gear #146
Comments
The addon-manager is not using the latest version. Try installing freecad.gears manually. |
Thanks for the quick reply! |
It depends on how you installed freecad. |
Simply downloaded the Windows installer and installed it... |
Ok then you need to install freecad.gears with the same python that is also shipped with freecad. Or you simple copy to the right place ..../lib/sitepackages |
it seems like you installed it to python 3.10. If freecad uses python 3.8.10 it will not see the installed freecad.gears. Maybe you can raise an issue for FreeCAD and show that the add-on-manager is not using the latest version of freecad.gears. |
I see, thanks for explaining this to me! |
To follow up on this. When saving the file with a generated gear, I had an error when the workbench was installed using the built-in addon manager. Here is the error message in the console:
I have just tried installing the gear workbench in FreeCAD on MacOS using pip. For that, I have cd'd into /Applications/FreeCAD.app/Contents/Resources/bin/ and run: Everything was installed without problem, however, the same error remains. ./python --version prints: "Python 3.10.13" The file is actually saved, and the generated gear is there after re-opening, but probably with some information loss. |
@chennes do you know why some people have problems install the latest version of this workbench with the addonmanager? |
I just installed it with the Addon Manager and it worked fine (though I don't know how to test that the WB itself is working, I just hit install, restarted, then launched it). |
@chennes See the OP: just create a timing gear and save it. Then you'll see (or not :) ) the issue. |
Same problem here.
The next exception is triggered when saving the project. Also, it is triggered for every gear, not just once.
|
Can confirm with Python 3.11:
|
Same errors saving (as described in [#146#issuecomment-2111358476]) when installing latest manually (#146 (comment))
V1.2.0 was added to package.xml in 6197bfd Here are all the commits since then and doing a quick scan I didn't see any that might fix this issue: 6197bfd...master |
I'm still seeing with a git clone into the %appdata%/FreeCAD/Mod folder. python on the system was 3.11, freecad uses 3.8. Issue happens both with version 6197bfd as with master. To me, it looks like it's trying to serialize something it shouldn't be serializing. features.py/ViewProviderGear or InvoluteGear looks like they are not meant to be serialized with json, but i don't know enough about freecad's internals to know what it should do instead, or how it should be able to convert it into json. |
I am not sure how to reproduce this error:
|
I downloaded FreeCAD about a week or two ago from the website, installed gears through the addon manager, and i had the issue. I then uninstalled gears, and installed via git clone into the appdata folder, and it was still there. When i'm back at that device i can look at what the version number of FreeCAD was, but i wonder if that's something they could have broken, unless they are now saving a lot more objects than they used to do in the release I used? The issue appears the first save after inserting a involute gear in a new document. |
hmm strange.
and
is this platform specific? |
The error would suggest not, it's json serialization of an object, which would never work on any platform? I'll see if i can reproduce it on another (Windows) machine this weekend. This is enough for me to have the error:
There is python 3.12 on my system, but FreeCAD bundled it's own 3.8. |
Issue SummaryError related to System Details
Example Error Output
Solution Steps
Explanation of FixThe |
thanks, applied with 4d87de3 please test and close issue if issue is resolved. |
Thank you for your quick response. I noticed the error also occurs when creating and saving new gears, but it temporarily resolves after saving the project and reloading FreeCAD. The following errors appear:
Additional details on the final error:
|
I just installed this WB for the latest FreeCAD (0.21.2) as I need to add a timing gear to my project. The gear appear fine, I can change its properties, all is good, but when I save the project, I get the following error in the 'Report view':
While trying to figure out what causes this I noticed that any gear type causes the same problem.
Is it possible that the current version of the WB is not compatible with the latest version of FreeCAD? Or something is wrong in my environment? All other WBs work fine on my computer. My environment is a 64 bit Windows 11.
Thank you in advance for any pointers!
The text was updated successfully, but these errors were encountered: