fp = urllib.request.urlopen(
    'http://scholar.google.com/scholar.bib?q=info:K7uZdMSvdQ0J:scholar.google.com/&output=citation&hl=en&as_sdt=1,14&ct=citation&cd=0'
    )
with open('citi0.bib', 'w') as fo:
    pass
How do I fix a ValueError: read of closed file exception?