Skip to content

Add correct import statement to FAQ#204

Merged
mdehoon merged 1 commit intobiopython:masterfrom
erik-whiting:struct-faq-doc-fix
Aug 4, 2024
Merged

Add correct import statement to FAQ#204
mdehoon merged 1 commit intobiopython:masterfrom
erik-whiting:struct-faq-doc-fix

Conversation

@erik-whiting
Copy link
Contributor

I was having an issue following along with the code on this page. When I only ran the code as it was described, I would get this error:

>>> MMCIF2Dict("5SWE.Cif")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: 'module' object is not callable

Earlier in the wiki page, you're told to run from Bio.PDB import *, which imports the module of MMCIF2Dict, but not the class. So I updated the doc since I I think this is actually the second time I've landed on this page and experienced this problem.

@erik-whiting
Copy link
Contributor Author

Requesting @mdehoon and/or @peterjc as reviewers

@mdehoon mdehoon self-requested a review August 4, 2024 06:19
@mdehoon mdehoon merged commit 031019e into biopython:master Aug 4, 2024
@mdehoon
Copy link
Contributor

mdehoon commented Aug 4, 2024

The code design, with a class in a module of the same name, is a bit ugly. Looks like Perl or Java. At some point, we should clean that up.

@erik-whiting erik-whiting deleted the struct-faq-doc-fix branch August 4, 2024 22:32
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

Successfully merging this pull request may close these issues.

2 participants