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

CTGAN import error #3

Open
LMeynent opened this issue Mar 15, 2021 · 1 comment
Open

CTGAN import error #3

LMeynent opened this issue Mar 15, 2021 · 1 comment

Comments

@LMeynent
Copy link

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.

@tandriamil
Copy link
Contributor

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?

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