DiGress icon indicating copy to clipboard operation
DiGress copied to clipboard

Import problem in training stage

Open lajictw opened this issue 1 year ago • 3 comments

Hi! I met an import problem in training stage. When running the main.py, it reports

Error executing job with overrides: [] Traceback (most recent call last): File "/mnt/c/Users/14242/Desktop/PaperCode/DiGress/./src/main.py", line 104, in main from metrics.molecular_metrics import TrainMolecularMetrics, SamplingMolecularMetrics File "/mnt/c/Users/14242/Desktop/PaperCode/DiGress/src/metrics/molecular_metrics.py", line 1, in from rdkit import Chem File "/home/ctw/anaconda3/envs/GNN/lib/python3.9/site-packages/rdkit/Chem/init.py", line 16, in from rdkit.Chem import rdchem TypeError: No registered converter was able to produce a C++ rvalue of type std::string from this Python object of type str

But if I run the

from metrics.molecular_metrics import TrainMolecularMetrics, SamplingMolecularMetrics

alone, I don't have this problem. Screenshots of the run have been attached below. Thanks for your help! image Rdkit is also available. image

lajictw avatar Nov 15 '23 18:11 lajictw

Hello, did you run pip install -e . in the root folder?

You can try to import rdkit at the first line of main.py, sometimes it works. Apart from that, I am not able to help you unfortunately.

cvignac avatar Nov 22 '23 15:11 cvignac

I had met and solved it, move the error import sentence to the first line of the main.py

HeartrooT avatar Dec 06 '23 01:12 HeartrooT

I had met and solved it, move the error import sentence to the first line of the main.py

Thanks! I will check it out!

lajictw avatar Dec 06 '23 02:12 lajictw