VlachosGroup / pMuTT

Python Multiscale Thermochemistry Toolbox (pMuTT)
https://vlachosgroup.github.io/pMuTT/
40 stars 23 forks source link

ImportError: cannot import name 'write_thermo_yaml' from 'pmutt.io.omkm' #182

Closed lqcata closed 3 years ago

lqcata commented 3 years ago

import pmutt print(pmutt.version)

1.2.21


from pmutt.io.omkm import write_thermo__yaml

write_thermo_yaml(phases=phases, species=species, reactions=reactions, lateral_interactions=interactions, units=units, filename='./outputs/thermo.yaml')

ImportError Traceback (most recent call last)

in ----> 1 from pmutt.io.omkm import write_thermo__yaml 2 3 write_thermo_yaml(phases=phases, 4 species=species, 5 reactions=reactions, ImportError: cannot import name 'write_thermo__yaml' from 'pmutt.io.omkm' (/home/dft/.local/lib/python3.7/site-packages/pmutt/io/omkm.py)
jonlym commented 3 years ago

Was this copied from an example? Your import statement has an extra '_' i.e. "write_thermo__yaml" should be "write_thermo_yaml"

jonlym commented 3 years ago

I think this issue is resolved so I'm closing it. Feel free to reopen it if you had any other questions related to it.

lqcata commented 3 years ago

I think this issue is resolved so I'm closing it. Feel free to reopen it if you had any other questions related to it.

Thanks, I have checked it again. The script works after removing the extra '_'.