tommeagher / heroku_ebooks

An archive of a script to generate Markov chains and to post to an _ebooks account on Twitter using Heroku. No longer actively supported.
264 stars 163 forks source link

Syntax Error "ebooks.py", line 69 #27

Closed Schwarzenegg closed 7 years ago

Schwarzenegg commented 7 years ago

Hey there, I'm running into the issue below. I'm not familiar with the language so don't understand how to fix your syntax. Can you please advise?

@tommeagher

$ heroku run worker Running worker on ⬢ guarded-brushlands-52122... up, run.7914 (Free) File "ebooks.py", line 69 print ">>> Generating from {0}".format(file) ^ SyntaxError: invalid syntax screen shot 2017-07-09 at 4 49 50 pm

tommeagher commented 7 years ago

@Schwarzenegg, thanks for flagging this. I believe the problem is that Heroku now uses Python3 by default, but this library was written in Python 2.7. I just pushed a fix to the Github repo, if you want to use that, or simply add this runtime.txt file to your project directory and push the change to Heroku. It should fix the issue. Let me know if it doesn't work.