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

AsyncIO only prints the single url #58

Open
surfer190 opened this issue Jul 23, 2019 · 3 comments
Open

AsyncIO only prints the single url #58

surfer190 opened this issue Jul 23, 2019 · 3 comments

Comments

@surfer190
Copy link

The https://www.jython.org url is never downloaded based on what is printed out

Steps to recreate:

git clone git@github.com:realpython/materials.git real_python_materials
cd real_python_materials/
python3.6 -m venv 36env
source 36env/bin/activate
pip install aiohttp

Running the script:

python io_asyncio.py 
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Read 273 from http://olympus.realpython.org/dice
Downloaded 160 sites in 3.151465892791748 seconds
@jima80525
Copy link
Contributor

Hmm. Possible that it was down? What did "wget www.jython.org" do? It's working for me presently.

If it's still failing, feel free to substitute a different URL, that particular one isn't critical, just something to download. :)

@surfer190
Copy link
Author

wget gives me: Unable to establish SSL connection.

Strange that python io_threading.py work's correctly with python requests.

@jima80525
Copy link
Contributor

I just checked and the threading version is using https as well. Perhaps requests is doing something smarter about SSL certs than aiohttp is. That seems the likely candidate.

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