2

As stated in the question, something weird is happening. My quandl code:

import quandl

df = quandl.get('WIKI/GOOGL')
print(df.head())

Responds after a few minutes on my home network, however if i connect my laptop to mobile WIFI hotspot, it responds in seconds.

I am truely perplexed as to the cause of this issue

KAKAK
  • 879
  • 7
  • 16
  • 32

3 Answers3

2

Apparently Quandl python module is having issues where IPV6 Protocol connectivity is supported along with IPV4. By disabling IPV6 connectivity on my ubuntu machine, the data response is prompt and normal.

Steps to disable IPV6 in ubuntu:

Edit the sysctl.conf file as follows:

sudo gedit /etc/sysctl.conf

Append the following lines at the bottom:

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1

Restart the systcl.conf file or reboot:

sudo sysctl -p

Happy mining! =D

KAKAK
  • 879
  • 7
  • 16
  • 32
0

Can you confirm if your network is using IPv4 or IPv6? There appears to be an issue with IPv6 and the Quandl API lately. We are investigating

  • Quandl is indeed having issues where IPV6 is supported along with IPV4. Please see my answers as to how i solved it. Thanks for pointing it out. – KAKAK Oct 18 '16 at 08:09
  • 1
    We are working with our provider to rectify the IPv6 issue. Will hopefully have this resolved soon. – Matthew Basset Oct 18 '16 at 13:17
  • Following up. IPv6 should now be working properly for those using www.quandl.com. If you still are having issues please be sure to reach out to support or try the solution above. – Matthew Basset Nov 01 '16 at 19:08
0

Another way to mitigate the issue without disabling IPv6 would be to prioritize IPv4 resolution. You can configure how getaddrinfo() works by editing/creating /etc/gai.conf and giving a high precedence to the IPv4 range:

precedence ::ffff:0:0/96  100
Guillaume
  • 301
  • 3
  • 4