synthetic_data_release
synthetic_data_release copied to clipboard
CTGAN import error
Hello,
While trying to install the code on my computer, I encountered the following error when trying to import ctgan
:
>>> import ctgan
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/leo/opt/anaconda3/envs/spring/lib/python3.7/site-packages/ctgan/__init__.py", line 10, in <module>
from ctgan.synthesizer import CTGANSynthesizer
File "/Users/leo/opt/anaconda3/envs/spring/lib/python3.7/site-packages/ctgan/synthesizer.py", line 16, in <module>
fileConfig(logconfig)
File "/Users/leo/opt/anaconda3/envs/spring/lib/python3.7/logging/config.py", line 71, in fileConfig
formatters = _create_formatters(cp)
File "/Users/leo/opt/anaconda3/envs/spring/lib/python3.7/logging/config.py", line 104, in _create_formatters
flist = cp["formatters"]["keys"]
File "/Users/leo/opt/anaconda3/envs/spring/lib/python3.7/configparser.py", line 958, in __getitem__
raise KeyError(key)
KeyError: 'formatters'
This error happens when I import from the synthetic_data_release folder. If I run the same command as above from the CTGAN subfolder it works fine. This is however an issue since it raises an error during unit testing: ERROR: tests.test_gms (unittest.loader._FailedTest)
I am using Mac OSX, Python 3.7 and followed the described installation steps. Only difference is that I use conda to manage my virtual environment.
My solution to this is to add the CTGAN repository in the python path:
export PYTHONPATH=$PYTHONPATH:`pwd`/CTGAN
Maybe it would be nice to add this to the README regarding the installation of the CTGAN repository?