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

import error urllib #4

Open
alexander-santiago opened this issue Mar 9, 2019 · 2 comments
Open

import error urllib #4

alexander-santiago opened this issue Mar 9, 2019 · 2 comments

Comments

@alexander-santiago
Copy link

Hi Chuan,

when I try to run shutterscrape.py it prompts me an import error.

Alexanders-MacBook-Pro:shutterscrape alexandersantiago$ python shutterscrape.py
Traceback (most recent call last):
File "shutterscrape.py", line 6, in
from urllib import urlopen
ImportError: cannot import name 'urlopen'

Can you help me on that one please?

@chuanenlin
Copy link
Owner

I'm guessing that you are using Python 3 instead of Python 2. If this is the case, you may either try running shutterscrape.py with Python 2 or change the code to Python 3 syntax, e.g. from urllib.request import urlopen.

@alexander-santiago
Copy link
Author

Thanks for the hint. I made some changes to the code according to Python 3 Syntax now. It works now. Thanks!
Great tool!

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