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

SyntaxError: invalid syntax #6

Closed
KasperSvendsenGit opened this issue Oct 7, 2020 · 8 comments
Closed

SyntaxError: invalid syntax #6

KasperSvendsenGit opened this issue Oct 7, 2020 · 8 comments

Comments

@KasperSvendsenGit
Copy link

KasperSvendsenGit commented Oct 7, 2020

Hi,
I'm getting a syntax error when trying execute. Doesn't seem to be related to file formats... Can you help.

python fvid.py -i test.mp4 -e
File "fvid.py", line 90
f"{FRAMES_DIR}decoded_frames%03d.png"
^
SyntaxError: invalid syntax

python fvid.py -i image.jpeg -e
File "fvid.py", line 90
f"{FRAMES_DIR}decoded_frames%03d.png"
^
SyntaxError: invalid syntax

python fvid.py -i image2.png -e
File "fvid.py", line 90
f"{FRAMES_DIR}decoded_frames%03d.png"
^
SyntaxError: invalid syntax

python fvid.py -i test.txt -e
File "fvid.py", line 90
f"{FRAMES_DIR}decoded_frames%03d.png"
^
SyntaxError: invalid syntax

@YakirOren
Copy link

check the version of python

@KasperSvendsenGit
Copy link
Author

check the version of python

I'm running Python 2.7.18, tried running it with Python3 as well, but get different errors with that.
Thanks!

@YakirOren
Copy link

im trying to figure out the other errors too :/
#7

@dtaivpp
Copy link
Contributor

dtaivpp commented Oct 7, 2020

Hey all post your other errors here. I got this working on macos python 3. One of the issues I ran into is you need to install libmagic. If you have homebrew you can do brew install libmagic

Also @KasperSvendsenGit your issue with python 2 is it doesn't have support for 'f' strings so it will need to be run with Python3

@AlfredoSequeida
Copy link
Owner

@KasperSvendsenGit The first thing that comes to mind is what @dtaivpp said. fstrings were implemented with python 3.6. So if you tried python 3 then I would make sure that you have 3.6 or newer.

@KasperSvendsenGit
Copy link
Author

@KasperSvendsenGit The first thing that comes to mind is what @dtaivpp said. fstrings were implemented with python 3.6. So if you tried python 3 then I would make sure that you have 3.6 or newer.

Alright now running on Python 3.8.6, it doesn't strictly error out anymore, though I don't get an output file. @dtaivpp Installing libmagic doesn't seem to have changed anything on linux.

image

@AlfredoSequeida
Copy link
Owner

AlfredoSequeida commented Oct 8, 2020

@KasperSvendsenGit I'm glad you got that working. If you're using the latest version (0.0.2) from this repo, the project structure has changed so running it like that won't work without some modifications since the entry point has changed.

The easy fix would be to install it using pip3

pip3 install fvid

then you can just run it like:

fvid -i [input file] -e

to encode from any directory in your command line

alternatively, you should also be able to call it using the __main__.py file

Let me know how that goes for you.

@KasperSvendsenGit
Copy link
Author

@AlfredoSequeida I've resolved the problem by running "sudo pip3 install fvid"

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants