Python Forum
Failed to download Qualtrics data using API
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Failed to download Qualtrics data using API
#1
Hi Experts ,

I am new to Python as well as to this forum.
i am trying to download Qualtrics Survey data into CSV format.
some how i was able to design python code and execute and its failing with below error message.

TimeoutError: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x000002167CC76A20>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

Note : when i run the same in other than my office network then its working fine and able to download CSV file.
Reply
#2
Can be problem on your network,port,firewall...ect.
Try first to see if ordinary requests work.
import requests

r = requests.get("http://www.google.com")
print(r.text[:200]) 
Then try using a proxy free-proxy ,try several and with more than one time as the can go up and down
import requests

r = requests.get("http://www.google.com", proxies={"http": "http://45.77.136.228:8118"})
print(r.text[:200])
So if it don't work a normal error is Failed to establish a new connection: [WinError 10060] as you get.
Reply
#3
Hi Snippsat,

Thank you so much your response.
I just executed your first reply and even that is getting failed with same error message.
and i am adding additional error messages along with above.

MaxRetryError: HTTPConnectionPool(host='www.google.com', port=80): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x000001D718C70780>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond'))

ConnectionError: HTTPConnectionPool(host='www.google.com', port=80): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x000001D718C70780>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond'))

Thanks in advance.
Reply
#4
Try turn of firewall/antivirus is you use,and try again.
Now it even block on port=80 the port that browser use.
See if you use proxy in your browser,search proxy setting <your browser>.

Try my other code with proxy from the free-proxy-list,and see if you can get one to work.
Reply
#5
I hate to post an R solution to a Python forum, but the R qualtRics package really makes it simple. If that’s something you are willing to consider the YouTube video below shows how to use the API and qualtRics package in R. Apparently you can do this in JavaScript too but I haven’t had luck.

Qualtrics API and R - Automate
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Yfinance - Intraday stock data with yf.download diogo_80 2 5,872 Apr-29-2022, 05:07 AM
Last Post: processingclouds
  download with internet download manager coral_raha 0 2,882 Jul-18-2021, 03:11 PM
Last Post: coral_raha
  Code should download and output trading data tayy 2 2,594 Mar-04-2021, 04:07 AM
Last Post: tayy
  Download data from webpage after POST request AlDe 0 2,176 Feb-02-2019, 06:26 AM
Last Post: AlDe
  PyUSB Problem: Failed Commands and Timeout Without Data ssstreet 0 4,461 Feb-24-2017, 08:30 PM
Last Post: ssstreet
  Problem with NTLM to download data azahar 1 4,043 Dec-21-2016, 09:54 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020