Astroquery: AttributeError("‘bytes’对象没有'encode'属性")

0 投票
1 回答
2102 浏览
提问于 2025-04-18 09:56

我想运行astroquery包中的NED查询。

from astroquery.ned import Ned
result_table = Ned.query_object("NGC 224")

这个是文档中的一个示例。

我遇到了以下问题:

TableParseError: Failed to parse NED result! The raw response can be found in
self.response, and the error in self.table_parse_error.

在self.table_parse_error中我发现:

 AttributeError("'bytes' object has no attribute 'encode'")

我不知道哪里出错了。

以下是我的版本信息:

Python  3.4.1 (default, May 19 2014, 17:23:49) [GCC 4.9.0 20140507 (prerelease)]
SciPy   0.14.0
Cython  0.20.1
OS      posix [linux]
Numpy   1.8.1
IPython 2.1.0

1 个回答

1

这个问题在astroquery上被提出来了,确认是个bug:https://github.com/astropy/astroquery/pull/343

这个问题应该很快就会修复好。

撰写回答