- 积分
- 263
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2017-4-12
- 最后登录
- 1970-1-1
|
楼主 |
发表于 2017-7-6 20:16:49
|
显示全部楼层
王老师您好。您能不能再帮我看一下这是我用来 格点转站点 的脚本(我是刚接触所以有点不太懂),出现了这个问题:Traceback (most recent call last): 。谢谢您了
File "<string>", line 32, in <module>
AttributeError: 'NoneType' object has no attribute 'ToStation'
脚本:
import clr
clr.AddReferenceByPartialName("System")
clr.AddReferenceByPartialName("System.Windows.Forms")
clr.AddReferenceByPartialName("System.Drawing")
from System import *
from System.Windows.Forms import *
from System.Drawing import *
clr.AddReference("MeteoInfoC.dll")
from MeteoInfoC import *
from MeteoInfoC.Layout import *
from MeteoInfoC.Data import *
BaseDir = "E:\\Meteolnfo\\MeteoInfo\\"
MapDir = BaseDir + "Map\\"
LegendDir = BaseDir + "Legend\\"
DataDir = BaseDir + "Sample\\GrADS\\"
OutDir = "E:\\Temp\\"
myApp = MIApp()
#---- 打开格点数据文件
df = DataDir + "201507.ctl"
myApp.OpenGrADSData(df)
gData = myApp.GetGridData("PS")
inf = OutDir + "China_Prec_2010101420.csv"
outf = OutDir + "test.txt"
gData.ToStation(inf, outf)
|
|