jameskermode / aps-length

Calculate length (number of equivalent words) for APS manuscripts written with LaTeX
GNU General Public License v2.0
39 stars 16 forks source link

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

Open knifelees3 opened 3 years ago

knifelees3 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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'