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

Not Compatible with Newer Python Versions #15

Open
ghost opened this issue Mar 31, 2017 · 2 comments
Open

Not Compatible with Newer Python Versions #15

ghost opened this issue Mar 31, 2017 · 2 comments

Comments

@ghost
Copy link

ghost commented Mar 31, 2017

When I first tried to run this project it did not work (many errors) but I soon realized it was probably written for Python 2.7 and a lot of systems now default to Python 3.x including mine. When I forced it to run with Python 2.7 all was well and worked as expected. I don't know if the author wants to update this program to support Python 3.x or not but I hope this issue will at least help other users who face this same issue to realize they must use Python 2.7 to make it work.

@d6o
Copy link
Owner

d6o commented Mar 31, 2017

Hi brian!

Thank you for this! I will work to update the script, can you tell me exact what python version are you using?

@ghost
Copy link
Author

ghost commented Mar 31, 2017

I'm using Python 3.6.0 on Gentoo Linux, I've tested with Python 3.4 and 3.5 on the same system and got the same results. All of the errors look to be syntax changes that happened in the transition from 2.7 to 3.x. Below I've listed the errors I got:

File "tumblrdownloader.py", line 30
except Exception,e:
SyntaxError: invalid syntax

I fixed this one myself and tried again and got this:

File "tumblrdownloader.py", line 31
print " Error: %s"%e
SyntaxError: Missing parentheses in call to 'print'

I fixed this one too then got this:

File "tumblrdownloader.py", line 36
name = self.image_prefix + "_" + image_name
TabError: inconsistent use of tabs and spaces in indentation

After this one I switched to using Python 2.7 and everything worked so I don't know how many more there are. I found the following information relating to the first and second issues:

http://sebastianraschka.com/Articles/2014_python_2_3_key_diff.html#handling-exceptions

http://sebastianraschka.com/Articles/2014_python_2_3_key_diff.html#the-print-function

Hope this helps :)

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

1 participant