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

Doesn't seem to work on ubuntu #36

Closed
SarahClerge opened this issue Sep 19, 2022 · 1 comment
Closed

Doesn't seem to work on ubuntu #36

SarahClerge opened this issue Sep 19, 2022 · 1 comment

Comments

@SarahClerge
Copy link

Hi,

To write a blog post for my company, I wanted to run Conderser on Ubuntu.

I downloaded Pynthon 3 (updated), python3-mysql.connector, python-psycopg2 and python-toposort, then I copied the repo on my machine, after installing postgresql 14 and putting a database that would serve as a test game.

Of course, I made sure that my environment variables included the variables from the Postgresql libraries.

I created my own configuration file, named config.json, here is what it contains:

{
"initial_targets": [
        {
            "table": "mgd.gxd_htsample_rnaseq",
            "percent": 10
        }
    ],
    "db_type": "postgres",
    "source_db_connection_info": {
        "user_name": "postgres",
        "host": "localhost",
        "db_name": "test",
        "port": 5432
    },
    "destination_db_connection_info": {
        "user_name": "postgres",
        "host": "localhost",
        "db_name": "test2",
        "port": 5432
    },
    "keep_disconnected_tables": false,
    "excluded_tables": [ ],
    "passthrough_tables": [ ],
    "dependency_breaks": [ ],
    "fk_augmentation": [ ],
    "upstream_filters": [ ]
 }

Thinking I had everything configured correctly, I therefore launched the python script direct_subset.py.

And I ended up with the following error:

Traceback (most recent call last):
  File "direct_subset.py", line 2, in <module>
    import config_reader, result_tabulator
  File "/var/lib/postgresql/condenser/config_reader.py", line 8
    print('WARNING: Attempted to initialize configuration twice.', file=sys.stderr)
                                                                       ^
SyntaxError: invalid syntax

Trying to understand where this error comes from, I deleted the two files config.json.example and config.json.example_all, but I still have the same error.

And since I've never done python, I'm unable to debug myself...

Could someone tell me what's wrong?

Thanks !

@mwcaisse
Copy link
Contributor

Hi Sarah,

Would you mind sharing the full command that you are using to run?

Is it python script direct_subset.py? If so, I would make sure that python refers to python3, I believe on older versions of Ubuntu python is the python 2 executable, while python3 points to python 3. Condenser only supports python3.

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