SyntaxError: Invalid Syntax with any command

#24 · closed · 13 comments

View on GitHub ↗

Qwerty-Space

This is the error: ``` File "/usr/local/bin/whatmp3", line 157 print("ERROR: %s: %s" % (r, msg), file=sys.stderr) ``` Thank you!

Comments

ekovac

At a guess, looks like you're trying to run it with python 2.x. Does it work with python 3?

Qwerty-Space

@pkovac I was in fact on python 2, I just updated to python 3, and: ![image](https://cloud.githubusercontent.com/assets/6967592/17786212/b9312414-657b-11e6-9eb5-6ffc8ce4ce5c.png)

RecursiveForest

Are you sure you're invoking it with python3?

RecursiveForest

Additionally, what version are you using? It doesn't look like you're using git head.

Qwerty-Space

I'm using WhatMP3 version 3.7. And how would I invoke it with python 3?

RecursiveForest

Type `python3 /usr/local/bin/whatmp3'; and unfortunately most even remotely modern versions are labeled 3.7 right now. Consider getting a version directly from git.

Qwerty-Space

So, how would I upgrade, and make it work by just typing `whatmp3 [command]`?

Qwerty-Space

Typing `python3 /usr/local/bin/whatmp3 [command]` works by the way

RecursiveForest

Upgrading is a matter of using your package manager. Check out your distro's documentation. Alternatively you can `git clone http://github.com/RecursiveForest/whatmp3` and then run `sudo make install`. If you still have trouble running the script, edit the first line of the script to read `#!/usr/bin/python3`.

Qwerty-Space

I've already downloaded whatmp3 tar.gz file and run `sudo make install` I followed the instructions in the readme

Qwerty-Space

Which file do I need to edit?

RecursiveForest

whatmp3.py

Qwerty-Space

I ran `sudo nano /usr/local/bin/whatmp3` and changed the first line to read `#!/usr/bin/python3` and made a backup of the old one.