aps-length icon indicating copy to clipboard operation
aps-length copied to clipboard

SyntaxError: Missing parentheses in call to 'print'. Did you mean print('Equations: %r' % eqn_words)?

Open knifelees3 opened this issue 4 years ago • 2 comments

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?

knifelees3 avatar Jan 03 '21 07:01 knifelees3

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.

jameskermode avatar Jan 03 '21 18:01 jameskermode

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'

knifelees3 avatar Jan 04 '21 06:01 knifelees3