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: Missing parentheses in call to 'print'. Did you mean print('Equations: %r' % eqn_words)? #11

Open
knifelees3 opened this issue Jan 3, 2021 · 2 comments

Comments

@knifelees3
Copy link

Hello, thank you for your useful program and I want to use this program to do a word count for my manuscript. My computer use winodws system and I found that this program can't be run in windows. So I use the subsystem (ubuntu18.04) of windows to run "aps-length", I type
./aps-length ./test.tex

and I got the following error:

File "./aps-length", line 380 print 'Equations: %r' % eqn_words ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print('Equations: %r' % eqn_words)?

can you help me solve this?

@jameskermode
Copy link
Owner

It’s an old code which has not yet been updated to Python 3. You may still have a python2 executable or similar, or it would not be a big job to update it with the 2to3 automatic converter.

@knifelees3
Copy link
Author

It’s an old code which has not yet been updated to Python 3. You may still have a python2 executable or similar, or it would not be a big job to update it with the 2to3 automatic converter.

Thank you for your reply and I tried to use python2 to run the aps-length program by editing the first line as follows
#!/usr/bin/env python2
then I can make sure that the program will run the python2 version. However, I got the following problem, can you help me figure out this ?

IOError: [Errno 2] No such file or directory: 'wordcount.log'

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