lanl / 4DGB

4D Genome Browser project
1 stars 2 forks source link

Python reports syntax error in make_release script #6

Closed dhrogers closed 3 years ago

dhrogers commented 3 years ago

Error when running make_release script on OSX, with python 3.9.5. I haven't seen this on my machine. Roberto is using 3.9.5, though, and gets a syntax error as below. I'm not familiar with the asterisk syntax, so I'm not sure how to fix this.

Solution could be to use a different python version, and that would be fine for now. If there's another fix, that would work, too.

PROBLEM

When running ./bin/make_release test.00 8000, we get the following error, with python 3.9.5 on OSX:

Making a release for project 'test.00' ...
Initializing database ...
  File "./bin/db_pop", line 143
    c.execute(insert, [map_id, *columns])
                               ^
SyntaxError: invalid syntax
camtauxe commented 3 years ago

After installing Python version 3.9.5, I was not able to reproduce this bug. Can you confirm that Roberto is indeed running this with version 3.9.5? Bear in mind that the db_pop script has this shebang line: #!/usr/bin/env python which, outside of a virtual environment, I would expect to actually refer to a Python 2 interpreter.

dhrogers commented 3 years ago

Hmm. We changed the script to call python3 in his repository, but I will check to make sure that's what was really happening. Will check it and get back to you.

dhrogers commented 3 years ago

My mistake. We had changed the 'python' to 'python3' in a different script.

Running with the 'real' python3, we get no error.

Apologies. We will make the changes in his environment.