-
Notifications
You must be signed in to change notification settings - Fork 134
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
vscode generates empty image #1091
Comments
Because you have not installed nglview for python 3.9 yet? |
Thank you for that. I know it's not installed in
It now creates a big enough window as a display area, but does not display any protein. I even tried creating a simple html file and viewing that -- I can see the stage but no protein. I'm not sure if I'm doing something obviously wrong, but here's the html: <!DOCTYPE html>
<html>
<head>
<title>test</title>
</head>
<body>
<script src="https://cdn.rawgit.com/arose/ngl/v2.0.0-dev.31/dist/ngl.js"></script>
<script>
var stage;
document.addEventListener("DOMContentLoaded", function () {
stage = new NGL.Stage("viewport");
stage.loadFile("rcsb://1crn", {defaultRepresentation: true});
});
</script>
<div id="viewport" style="width:800px; height:800px;"></div>
</body>
</html> It just renders an 800x800 black box with no protein. This is similar to what I see in jupyter (a white box version anyway). Tried both firefox, safari, and chrome, but just a black box. I can see the example codepen, just not anything local. |
I don't really know how to debug then. |
Update: both jupyter notebook and vscode can load local files, but not fetch them from pdb using |
That |
3.1.4 still appears to produce empty images for many PDB IDs: I think this could be a CIF parsing issue that was fixed in more recent versions of ngl? nglviewer/ngl#1001 |
Yeah, I have to use older version of ngl for vscode, newer version for lab. I will make another release soon that uses the same NGL latest version. |
I'm using vscode to edit
.ipynb
files. I'm also usingpyenv
to manage my python versions. I'm using3.11.2
, and have set my jupyter notebook kernel accordingly. I have:but only a thin white image with no apparent content shows up. I verify I'm using the correct python version within the notebook:
which outputs
I get no image when I use
jupyter notebook
either. Note that I had to add a kernel manually in/Users/iremaltan/Library/Jupyter/kernels
to be able to use the same python version. Thus, when I try to runit looks for a python 3.9 and spits out
No module named 'nglview'
. What do I do?The text was updated successfully, but these errors were encountered: