-
-
Notifications
You must be signed in to change notification settings - Fork 430
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
Linux Fixes #384
Linux Fixes #384
Conversation
requests uses certifi.where() and setting SSL_CERT_FILE will allow urllib to use the same certs
Forgot to mention I had also removed the I've now changed it so the The install dependencies operator will no longer attempt to preload models since that is handled on the backend and will always just error here. Fixed a regression that made it so the missing dependencies warning wouldn't appear. Snap installs programs under a read-only filesystem so now ensurepip can install to the user site when bootstrapping normally fails, and skips copying header files into the include directory. |
Do you know if there’s a bug filed for Blender about the OpenSSL paths? |
I don't know. I'll try to look. |
Can't find anything open or recent. I'll see about testing a beta build and file a report if it's still present. |
Made it so Install Dependencies can now install and use pip in .python_dependencies, blender site-packages, and user site-packages (attempts in that order). I didn't like the user site-packages workaround since that takes precedence in sys.path and may interfere with a separate python interpreter running its pip module, but I'm keeping it in case if both alternatives fail. |
I believe it's ready. I've tested on Windows to make sure it didn't accidentally cause issues there and it worked like normal. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
* isolate install_pip() from user site * kornia SSLCertVerificationError mitigation * simplify kornia SSLCertVerificationError mitigation requests uses certifi.where() and setting SSL_CERT_FILE will allow urllib to use the same certs * redirect subprocess's stdout to stderr * remove model preloading from install dependencies operator * use certifi for whole backend * fix dependencies missing warning * fix installing when certain directories are read only * install pip to .python_dependencies * add check argument * fix default argument
Main included fix is for
SSLCertVerificationError
while importingkornia
. Made it so the basessl
module can usecertifi
'scacert.pem
file. The Blender 3.3.1 version I used has a brokenssl
module that points to certs which do not exist, and I doubt this is the only version with the same problem.After the change
urllib
won't fail on every https request and correctly downloadscheckpoint_liberty_with_aug.pth
. If there ends up being more issues with SSL verification it's likely fixable by updating thecertifi
module via pip.Had an issue where for some reason pip was installed into the user site packages so ensurepip would not install it to Blender's
site-packages
directory. Made it so that should no longer accidentally happen.Removed model preloading from the install dependencies operator since that's taken care of in
prompt_to_image.py
and just errors here.Made it so the subprocess's stdout isn't discarded and is instead the same as stderr so it's still visible in the terminal. The model loading step will just print its error information so it was getting completely lost and leading to harder to debug issues.
This PR is not ready to merge yet since I'd like to spend more time trying to find more bugs to fix.