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

TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases #46

Open
thippo opened this issue Dec 23, 2024 · 3 comments

Comments

@thippo
Copy link

thippo commented Dec 23, 2024

(base) [root@ai_test src]# python main.py --prot-file chig.pdb --preprocess-dir chig_preprocessed --preeq-steps 0 --sim-steps 1000 --record-per-steps 1
Traceback (most recent call last):
File "/root/AI2BMD/src/main.py", line 10, in
from AIMD.simulator import SolventSimulator, NoSolventSimulator
File "/root/AI2BMD/src/AIMD/simulator.py", line 19, in
from Calculators.fragment import FragmentCalculator
File "/root/AI2BMD/src/Calculators/fragment.py", line 4, in
from Calculators.bonded import DLBondedCalculator
File "/root/AI2BMD/src/Calculators/bonded.py", line 15, in
from Fragmentation import DistanceFragment
File "/root/AI2BMD/src/Fragmentation/init.py", line 1, in
from .distancefrag import DistanceFragment
File "/root/AI2BMD/src/Fragmentation/distancefrag.py", line 17, in
from Fragmentation.hydrogen import CTable, HydrogenOptimizer, ProteinData, ProteinDataBatch
File "/root/AI2BMD/src/Fragmentation/hydrogen/init.py", line 2, in
from .energies import HydrogenOptimizer
File "/root/AI2BMD/src/Fragmentation/hydrogen/energies.py", line 5, in
from Fragmentation.hydrogen.topology import ProteinData
File "/root/AI2BMD/src/Fragmentation/hydrogen/topology.py", line 133, in
class ProteinDataBatch(Batch, ProteinData):
TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases

Is there same thing wrong with python code about subclass?

@bi-ran
Copy link
Collaborator

bi-ran commented Dec 26, 2024

how are you running the code? we cannot reproduce this error in the docker container we provide

@thippo
Copy link
Author

thippo commented Jan 6, 2025

how are you running the code? we cannot reproduce this error in the docker container we provide

Yes, It work in the docker container.

But when I run the src code, this error happend, because I want to do some secondary development.

@bi-ran
Copy link
Collaborator

bi-ran commented Jan 8, 2025

you can pass --src-dir /path/to/local/src/directory/ to the script to mount your local src directory with your changes. the error is likely due to incompatible package versions

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