-
Notifications
You must be signed in to change notification settings - Fork 15
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
AttributeError: module 'numpy' has no attribute 'object' #8
Comments
@yzhang-github-pub, With that environment I can run the example in PeSTo/ /apply_model.ipynb, which I have edited to convert into a python script below. I tested it running it interactively from PeSTo/ install folder, using the example in PeSTo/examples/issue_19_04_2023/2CUA_A.pdb, and compared the output with the website https://pesto.epfl.ch/. Note that for the results to match, you have to select "chainA" only on the website (if you select chainA and chainB, the PPI probabilities change).
|
Thanks @rubenalv ! I compared my converted python script with yours. The difference was I re-organized the import statements so that all modules to be imported from git repo were in one block: ... add module to pathif save_path not in sys.path: from src.dataset import StructuresDataset, collate_batch_features, select_by_sid, select_by_interface_types from config import config_model, config_data ... It seems moving "sys.path.insert(0, save_path)" before the 5 lines of "from src.* import *" caused the error. I still don't understand why, but the order seems to be important. Thanks again. |
@yzhang-github-pub, the |
The chain naming in the PDB format is not ideal, especially for other molecules (HETATM) associated with the closest chain. There can be also multiple copies of the same chain name (symmetric structures). So I'm appending a tag to the chain name to indicate differentiate between those. I represent the chain name per atom using an array of string. However the unicode string in Numpy has a fixed length (cannot append to the string directly) and they removed the generic I updated the code with a quick fix in commit d00b0d6 For now, it is using a buffer size of 10 characters for the chain name. The solution is not optimal but it should fix this issue in all cases. The |
Dear authors,
Thanks for developing this very useful tool. I am testing PeSTo, and got an error with numpy:
model/save/i_v4_1_2021-09-07_11-21/src/structure.py", line 99, in tag_hetatm_chains
structure = tag_hetatm_chains(structure)
AttributeError: module 'numpy' has no attribute 'object'
This is perhaps a numpy version issue. When I created the environment, conda automatically installed numpy 1.25. Can you please tell the numpy version that works? Or even better specify versions in pesto.yml file? Thanks.
The text was updated successfully, but these errors were encountered: