astropy/astroquery — pull request #185 by keflavich (2014-03-02 10:48:48+00:00)
Title: Failure in Vizier with Python 3

With Python 3, I get:

```
In [3]: Vizier.query_region("AFGL 2591", radius='0d5m', catalog="B/iram/pdbi")
Traceback (most recent call last):
File "/Users/tom/Library/Python/3.3/lib/python/site-packages/astroquery-0.0.dev998-py3.3.egg/astroquery/vizier/core.py", line 526, in _parse_result
tf.write(response.content.encode('utf-8'))
AttributeError: 'bytes' object has no attribute 'encode'
WARNING: Error in parsing result, returning raw result instead [astroquery.vizier.core]
Out[3]: b'\n\n \n VizieR Astronomical Server vizier.u-strasbg.fr\n Date: 2013-08-13T18:28:24 [V1.97 (28-Nov-2012)]\n Explanations and Statistics of UCDs:\t\t\tSee LINK below\n In case of problem, please report to:\tquestion@simbad.u-strasbg.fr\n \n\n\n\n\n\n-oc.form=D.\n-source=B/iram/pdbi\n-c=307.353875+40.188583\n-c.rd=0.08333333333333333\n-out=*\n-out.max=50\n\n\n\n\n\n\n\n IRAM Observation Logs (IRAM 1991-2013)\n \n

\n The Plateau de Bure Interferometer Observation Log between 1991-12-01 and 2012-03-31\n \n \n Identification code of the program\n \n \n Source name, as mentioned in the observing program\n \n \n Starting date of the Observation (5)\n \n \n Total on-source correlation time\n \n \n Program type (1)\n \n \n Velocity of the source (3)\n \n \n [LH] LSR or Heliocentric velocity\n \n \n ? Sky Frequency of the 3mm receiver (6)\n \n \n \n [UL] Signal Upper/Lower band of the 3mm receiver\n \n \n ? Sky Frequency of the 1mm receiver (6)\n \n \n \n [UL] Signal Upper/Lower band of the 1mm receiver\n \n \n Configuration code of the interferometer\n \n \n ? Right Ascension J2000\n \n \n \n ? Declination J2000\n \n \n\n
N032	AFGL2591	2003-12-06	16800	MAP	-5.5	L	80578	L	203407	L	6Cp	20:29:24.87	+40:11:19.8
\n
N032	AFGL2591	2004-05-15	1140	MAP	-5.5	L	80578	L	203407	L	6Dp	20:29:24.87	+40:11:19.8
\n
N032	AFGL2591	2004-05-15	7740	MAP	-5.5	L	80578	L	203407	L	6Dp	20:29:24.87	+40:11:19.8
\n
N032	AFGL2591	2004-05-16	24060	MAP	-5.5	L	80578	L	203407	L	6Dp	20:29:24.87	+40:11:19.8
\n
N032	AFGL2591	2004-05-17	3060	MAP	-5.5	L	80578	L	203407	L	6Dp	20:29:24.87	+40:11:19.8
\n
PB3F	AFGL2591	2005-12-25	4050	MAP	0.0	L	86610	L	230538	L	6Cq	20:29:24.80	+40:11:19.0
\n
PB3F	AFGL2591	2005-12-26	4050	MAP	0.0	L	86610	L	230538	L	6Cq	20:29:24.80	+40:11:19.0
\n
P04A	AFGL2591	2006-02-03	9000	MAP	-5.5	L	80578	L	203407	L	6Aq	20:29:24.87	+40:11:19.5
\n
PB3F	AFGL2591	2006-06-03	675	MAP	0.0	L	86610	L	230538	L	5Dq	20:29:24.80	+40:11:19.0
\n
PB3F	AFGL2591	2006-06-04	7425	MAP	0.0	L	86610	L	230538	L	5Dq	20:29:24.80	+40:11:19.0
\n
PB4A	AFGL2591	2007-02-19	9450	MAP	-5.5	L	80126	L	81030	L	6Aq	20:29:24.87	+40:11:19.5
\n
PA4A	AFGL2591	2007-03-04	10800	MAP	-5.5	L	203055	L	203739	L	6Aq	20:29:24.87	+40:11:19.5
\n
PA4A	AFGL2591	2007-03-13	10935	MAP	-5.5	L	203055	L	203739	L	6Bq	20:29:24.87	+40:11:19.5
\n
PA4A	AFGL2591	2007-03-15	9450	MAP	-5.5	L	203055	L	203739	L	6Bq	20:29:24.87	+40:11:19.5
\n\n

\n\n\n'
```