Skip to content
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

pypdb is failing in [recent] jupyterlab notebook document #67

Open
perllaghu opened this issue Jul 29, 2024 · 1 comment
Open

pypdb is failing in [recent] jupyterlab notebook document #67

perllaghu opened this issue Jul 29, 2024 · 1 comment

Comments

@perllaghu
Copy link

I'm getting connection errors - running in a docker image:

Start a docker image:

docker run -it --rm -p 8888:8888 quay.io/jupyter/base-notebook:2024-04-15

Test library

Cell 1:

%mamba install --yes matplotlib pypdb
    
%matplotlib inline
from IPython.display import HTML

from pypdb import *

%load_ext autoreload
%autoreload 2

found_pdbs = Query("ribosome").search()
print(found_pdbs[:10])

returns

TypeError: 'NoneType' object is not subscriptable

Cell 2 (assumes libraries installed in cell 1):

from pypdb.clients.data.data_types import DataFetcher, DataType
entry = DataFetcher(["4HHB", "12CA", "3PQR"], DataType.ENTRY)
property = {"exptl": ["method", "details"], "cell":["length_a", "length_b", "length_c"]}
entry.add_property(property)
entry.fetch_data()
print(entry.response)

... works:

Cell 3 (also assumes libraries pre-loaded):

from pypdb import *
found_pdbs = Query("ribosome").search()

fails with
[/opt/conda/lib/python3.11/site-packages/pypdb/util/http_requests.py:65](http://127.0.0.1:8888/opt/conda/lib/python3.11/site-packages/pypdb/util/http_requests.py#line=64): UserWarning: Too many failures on requests. Exiting... warnings.warn("Too many failures on requests. Exiting...")

.... Can I get confirmation the examples in cells 1 & 3 above are still valid & should work?

@williamgilpin
Copy link
Owner

I am getting errors as well. The RCSB may have changed their API structure, causing these requests to fail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants