【问题标题】:APLpy attribute error : 'module' object has no attribute 'FITSfigure'APLpy 属性错误:“模块”对象没有属性“FITSfigure”
【发布时间】:2014-09-29 08:43:54
【问题描述】:

我已经安装了 APLpy(版本 0.9.12)并且我有 python 2.7。

我有一个名为“test.fits”的 FITS 图像。

我给出了以下命令:

import aplpy
fig = aplpy.FITSfigure("test.fits")

然后我收到了这条消息:

AttributeError: 'module' object has no attribute 'FITSfigure'

当我尝试以下操作时,我收到了相同的消息:

fig = aplpy.aplpy.FITSfigure("test.fits")

我是 python 和 APLpy 的新手。

【问题讨论】:

  • 始终在您的问题中包含完整的追溯。在这种情况下,我可以使用它来精确定位您需要重命名的文件,以避免掩盖您想要使用的模块。

标签: python python-2.7 aplpy


【解决方案1】:

您的线路:

fig = aplpy.FITSfigure("test.fits")

拼写错误,应该是:

fig = aplpy.FITSFigure("test.fits")

【讨论】:

  • 顺便问一下,(1) aplpy.FITSFigure(...) 和 (2) aplpy.aplpy.FITSFigure(...) 有什么区别?我都试过了,都奏效了。
  • 对不起。我不熟悉Aplpy。我刚刚帮你查了一下;)
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2016-09-29
  • 2011-10-26
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多