-
Notifications
You must be signed in to change notification settings - Fork 233
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
In Blender 4.01 Freecad freezes Sverchok #5069
Comments
Try to use "C:\FreecadLibrary\fc_env" ? |
Hello Satabol, Add-on not loaded: 'sverchok-master' cause: cannot import name 'core' from partially initialized module 'sverchok-master' (most likely due to a circular import) Thank you for your time |
The content of my freecad_path.pth , located at C:\Program Files\Blender Foundation\Blender 4.0\4.0\python\lib\site-packages, is C:\FreecadLibrary\fc_env\Library\bin\ After a start the console give this message Traceback (most recent call last): This is the screencapture of console I also verified the content of the folder like you showed in your comment. |
Hi @lucagal . I think this error can be raised by FreeCad but I have no enough skills about FreeCad. I use my own instruction to build FreeCad for Sverchok. It work for Blender 4.0.1 too. I test it yesterday. Can you compare my instructions with your steps? ( I use standalone Blender 4.0.1, Windows 11, x64. Warnings: Vis->Viewers OpenGL nodes are not adapted for Blender 4.x now. Only Mesh viewers are working now. See list down ) |
Hi @lucagal Do you use some scheme when this errors happens or only on start of Blender? Can you try next steps?
|
Hi @satabol "Do you use some scheme when this errors happens or only on start of Blender?" On start of Blender "Can you try next steps? This is the printscreen of Python Console, and so on
How you can see from these printscreen I can import FreeCAD . Don't know if it is what you asked at this point 2
I tried with standalon version of Blender 4.01 with Sverchok shared with my profile and in the list of addons. I tried to import MeshPart in windows console, how you can see in this printscreen, launching python of my Blender I thank you very much for your help |
" 2. Try run freecad apparently of Blender." - this is my mistake. Sorry. I suppose to run FreeCAD as .exe. As I can see in the last screenshot a module Freecad MeshPart library was successfully imported in python console. So I think FreeCad can run as application. This is very strange that python command start blender python. Can you try windows console command "where python" As I found in one comment in https://stackoverflow.com/questions/41365446/how-to-resolve-importerror-dll-load-failed-on-python
|
Hello @satabol. " "2. Try run freecad apparently of Blender." - this is my mistake. Sorry. I suppose to run FreeCAD as .exe. As I can see in the last screenshot a module Freecad MeshPart library was successfully imported in python console. So I think FreeCad can run as application. This is very strange that python command start blender python. Can you try windows console command "where python This is what I get "1. lets test what paths of trusted location blender has? This is my paths and all path to freecad dll files are first in the list:" "2. Lets see what paths to Python in system variables:" in my User environment variables the PATH variable does not have a path to python, and the variable PYTHONPATH has this content: C:\Program Files\Blender Foundation\Blender 4.0\4.0\python\bin; and the variable PYTHONPATH is the same as in User environment variables: C:\Program Files\Blender Foundation\Blender 4.0\4.0\python\bin;C:\usr\include\eigen3;C:\usr\include\CGAL;C:\usr\include; Then no other paths to any other python environments. I Installed Anaconda instead Miniconda, and when I was installing Anaconda3 I unchecked settings to not register Anaconda as system Python. "3. Can you start python of Blender 4.0.1 with full path?" See the previous answer to point 1., which also includes point 3. From what I understand, it seems that importing MeshParts works when done directly from Python 3.10, but not when done through Blender 4.0's Python console. Is there any incompatibility between Freecad 0.21 and Blender 4.0? |
I don't think so for a while. Blender is compatible with Windows 8.1 and FreeCad is compatible with Windows 8.1 too. So lets try something else. ))) As I see your system paths is not like in my OS. So lets try change them:
P.S. |
Hi @satabol,
|
Hi @lucagal . I. Lets build list for good import: import dlltracer
import sys
with dlltracer.Trace(out=sys.stdout):
import FreeCAD
import MeshPart II. Disable Sverchok in Blender, close Blender, after start Blender check sverchok is not loaded. Close Blender again: III. Lets build list of loaded dll messages for wrong import: import dlltracer
import sys
with open("log.txt", "w") as log:
with dlltracer.Trace(out=log):
import FreeCAD
import MeshPart 5. Run script Print both result here, please! |
Hi @satabol, Python 3.10.13 (main, Sep 20 2023, 07:33:17) [MSC v.1928 64 bit (AMD64)] on win3
I was really surprised by the number of loading errors I encountered. From my first analysis comparing the two results it seems that these files were loaded from the python console but not from the Blender python console: msasn1.dll ---> C:\Windows\System32 Perhaps these files appear not to be loaded because they were already present when the script that imported FreeCAD and MeshPart was launched from Blender. However, it is remarkable. |
Hi @lucagal . Do you use windows 8.1 x32 or x64 ? |
Hi @satabol |
Can you explain why your paths in log do not contains full path? Paths in your logs looks like something cut them (no Device\HardDiskVolume): Is your log unmodified before insert here? |
I reinstalled dlltracer and repeated the procedure, obtaining some differences:
The files from the directory C:\FreeCADLibrary.... (except api-ms-win-crt-utility-l1-1-0.dll) are also present in the Blender directory, also if in a different release. I tried also to copy them temporarily in Blender directory but i get always the error about MeshPart or Blender doesn't run at all. |
There is some dirty method and it is not enough informative but can you try to see what blender try download when load Sverchok with FreeCad?
|
Hi satabol, |
Hi @lucagal . |
Hello! I noticed a problem mainly with MeshPart module in freecad, tested today in blender 4.0.1. sverchok\utils\solid.py -> comment line 24 -> #import MeshPart |
Hi @rastart, |
Hi @lucagal. "E:\Install\Blender\blender-3.6.9-windows-x64\3.6\python\bin\python.exe" -m pip install open3d Also Extra addon work too. |
Hi @lucagal
About pygalmesh: Do you use Extra addon on Windows? I build pygalmesh for windows. I plan create an instruction about this process but I can take you a raw version of building the pygalmesh for Windows. |
Hello @satabol, |
Hello @lucagal |
Steps to reproduce
I installed version 0.21 of the Freecad libraries via Anaconda in Windows 8.1 with Blender 4.01.
Then in Blender -> Preferences -> Addon -> Sverchok -> Extra Nodes -> FreeCAD package I set the path C:\FreecadLibrary\fc_env\Library\bin to the FreeCAD library, clicked on SetPath and then restarted Blender.
After restarting Blender I get the following error message:
AttributeError: 'NoneType' object has no attribute 'append_from_config'
Add-on not loaded: 'sverchok-master' cause: cannot import name 'core' from partially initialized module 'sverchok-master' (most likely due to a circular import)
(C:\Users\User\AppData\Roaming\Blender Foundation\Blender\4.0\scripts\addons\sverchok-master_init_.py)
and the Sverchok addon is disabled
freecad_d = sv_dependencies["freecad"] = SvDependency("FreeCAD", "https://www.freecadweb.org/")
#try:
#import FreeCAD
#freecad_d.module = FreeCAD
#except ImportError:
FreeCAD = None
disabling FreeCAD detection
Expected result
My goal was to install the FreeCAD dependency in Sverchok
Actual result
Sverchok works but without FreeCAD nodes
Sverchok version 1.20 installed from github and update function of Sverchok addon
The text was updated successfully, but these errors were encountered: