Closed acasterm closed 4 years ago
Which python version and AdomdClient dll are you using?
I’m not able to reproduce the error, could you post the code that produces the error?
Using python 3.7.4, Microsoft.AnalysisServices.AdomdClient.dll file version: 12.0.2000.8.
Screenshot below of Pyadomd error, and success connecting directly through AdomdConnection object from Microsoft.AnalysisServices.AdomdClient
It’s looks like it is the order of which you add the ADOMD dll to your path and initialize it. The package is looking up the ADOMD dll during import. That’s why you’re getting the error right after the import. Try to first to add the dll to the path, such that your code looks like this:
dll = 'C:\\Program Files\\Microsoft.NET\\ADOMD.NET\\120
from sys import path
path.append(dll)
and afterwords import the package
from pyadomd import Pyadomd
Did above solve the problem? 😊
It’s looks like it is the order of which you add the ADOMD dll to your path and initialize it. The package is looking up the ADOMD dll during import. That’s why you’re getting the error right after the import. Try to first to add the dll to the path, such that your code looks like this:
dll = 'C:\\Program Files\\Microsoft.NET\\ADOMD.NET\\120
from sys import path
path.append(dll)
and afterwords import the package
from pyadomd import Pyadomd
thank you this method is cool!
When I try to instantiate the Pyadomd object on init, I get the error below:
"File 'C:\my_path\pyadomd.py', line 125, in init "self.conn = AdomdConnection()" "Name error: name 'AdomdConnection' is not defined".
I add the DLL to my path as specified in the README.md
I am able to successfully run the code below successfully in my interpreter with the AdomdConnection object: