materials icon indicating copy to clipboard operation
materials copied to clipboard

AsyncIO only prints the single url

Open surfer190 opened this issue 5 years ago • 3 comments

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

Steps to recreate:

git clone [email protected]: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

surfer190 avatar Jul 23 '19 08:07 surfer190

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. :)

jima80525 avatar Jul 24 '19 02:07 jima80525

wget gives me: Unable to establish SSL connection.

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

surfer190 avatar Jul 24 '19 05:07 surfer190

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.

jima80525 avatar Jul 24 '19 12:07 jima80525