-
Notifications
You must be signed in to change notification settings - Fork 120
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
CQ Editor cannot find files in module search path #439
Comments
Addendum: This seems to be a problem with The
The
I think it would be nice if there is an option to inherit |
You seem to be using the packaged CQ-editor, so it has no relation with your venv. Does using Reading your question for the second time, what I mention above won't help. For now you could install your module in the (conda) env shipped with the installer. |
I found a workaround which is to put a sentinel file at the project root like this: import mylib.mystery
obj = mylib.mystery.mystery()
show_object(obj) but when I made changes to the object, cq-editor cannot pick it up even if I click Render. This is not a major problem since I can just copy whatever object I'm working on to this sentinel file. Edit: and the workaround of this is to either use the new nightly version (enabling "Reload imported modules") or add the following in the sentinel file # sentinel.py
...
import importlib
importlib.reload(mylib.mystery)
... Then
will react to changes in |
So I think the conclusion here is that CQ-editor has no "ope dir" or "open project" functionality. Might be a nice thing to add. |
Consider a project setup like this:
where
in a
poetry shell
environment, this succeeds:but if
example.py
contains any reference toimport mylib.mystery
, loading it up incq-editor
will fail, unless the script starts with this:The spooky thing is after this part of the script is loaded into cq-editor, commenting it out would not reintroduce the import error. Is there a way for cq-editor to recognize the current venv so it can load libraries referenced by cad scripts?
The text was updated successfully, but these errors were encountered: