steabert / molpy

Molcas wavefunction assistent
GNU General Public License v2.0
12 stars 5 forks source link

SyntaxError in penny #12

Closed Jellby closed 8 years ago

Jellby commented 8 years ago

With the latest version I get:

  File "./penny", line 360

      ^
SyntaxError: only named arguments may follow *expression

which refers to the line:

print(body.format(center, *coord, charge))

Do I need a more recent python version (I have 3.4.3) or...?

steabert commented 8 years ago

Did you handle a specific file? How can I reproduce it? I tried ./penny --mulliken examples/cucl4-cas.h5 and that works, my python version is 3.5.2

steabert commented 8 years ago

After some googling, this indeed came in with Python 3.5: https://www.python.org/dev/peps/pep-0448/ Feel free to adjust to code to work with earlier Python version and send a pull request :)

steabert commented 8 years ago

It might work by just unpacking as

x, y, z = coord
... (center, x, y, z, charge) ...
Jellby commented 8 years ago

It fails simply running ./penny. Unpacking x, y, z works, but I expect to update my systems soon, then I'll have python 3.5 and I won't mind.

steabert commented 8 years ago

OK, in that case I've just updated the README file to state that we require Python 3.5.