使用python连接到SSAS时出现错误

时间:2019-05-15 08:25:05

标签: python ssas clr

与SSAS连接时出现错误

我是python和SSAS的新手,我使用的是某人拥有的代码,但出现错误

    Message  File Name  Line    Position    
    Traceback               
<module>    module3 1       
<module>    C:\Users\mydesk\AppData\Local\Programs\Python\Python36\lib\site-packages\clr\__init__.py    3       
<module>    C:\Users\mydesk\AppData\Local\Programs\Python\Python36\lib\site-packages\clr\style_builder.py   4       
AttributeError: 'AsyncStream' object has no attribute 'isatty'              

这是我到目前为止所拥有的

    import clr
    from clr.System.Reflection import Assembly

    Assembly.LoadWithPartialName("AnalysisServices.dll")

    from clr.Microsoft.AnalysisServices import Server
    from clr.Microsoft.AnalysisServices import ProcessType

    serverName = 'B/B'
    dbName = 'CTM Analysis'

    # Connect to server
    amoServer = Server()
    amoServer.Connect(serverName)

    # Connect to database
    amoDb = amoServer.Databases[dbName]
    amoDb.Process(ProcessType.ProcessFull)

有人知道如何解决此问题吗? 我想要的是用Python连接SSAS

0 个答案:

没有答案