I am trying a basic Biopython example from an online course. However, I am unable to query the NCBIWWW database to align a query sequence. The program fails with a URL error.
My code is as follows:
from Bio.Blast import NCBIWWW, NCBIXML
fasta_string = "TGGGCCTCATATTTATCCTATATACCATGTTCGTATGGTGGCGCGATGTTCTACGTGAATCCACGTTCGAAGGACATCATACCAAAGTCGTACAATTAGGACCTCGATATGGTTTTATTCTGTTTATCGTATCGGAGGTTATGTTCTTTTTTGCTCTTTTTCGGGCTTCTTCTCATTCTTCTTTGGCACCTACGGTAGAG"
h = NCBIWWW.qblast("blastn", "nt", fasta_string)
However, this returns the following error:
urllib2.URLError: <urlopen error [Errno 8] nodename nor servname provided, or not known>
Do I need to configure Biopython before I use it? I think I am using the correct parameters to the blast function.