Traceback (most recent call last): File "apaga.py", line 18, in urllib.urlretrieve('http://maps.google.com.br/maps/ms?msid=' + uid + '.' + str(mapid) + '&msa=0&output=kml', mapname + '.kml') File "C:\Python26\lib\urllib.py", line 93, in urlretrieve return _urlopener.retrieve(url, filename, reporthook, data) File "C:\Python26\lib\urllib.py", line 243, in retrieve tfp = open(filename, 'wb') IOError: [Errno 22] invalid mode ('wb') or filename: ' ... etc etc etc and so goes on with all the page content