-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Running ssas_api.py and getting connected to AAS issue #12
Comments
Can you post your complete code example that fails? |
Sure, so I have 2 files in my editor (ssas_api.py copy exactly same as in repo)
These are both shown down below. My main question is: I am not too sure what additional things I need to do along with having these files in order to run/get the DAX query data successfully from a particular AAS server.
File 1: QuickStart
File 2: ssas_api.py script for AAS connection
|
No you do not need to install |
No it doesn't seem to be working. The errors I find when I try running my Quickstart file (as stated above) are:
I just want to ensure that if we take the Quickstart & ssas_api.py (as is) into the same directory and run the Quickstart it should work as is? I am not entirely sure if I need to change anything or am doing something wrong. I just want to be able send a DAX query against AAS and receive a response and store the result in a dataframe. Not sure if you are able to provide further guidance on how to do this? |
I did also follow the steps in the README.md "Getting The Required .Net Libraries" regarding the .net libraries and confirmed that the following python snippet applies in my case:
Do I need to copy this info into the ssas_api.py file in anyway for it to run? |
yes that is the issue. your .Net DLLs are not being found. All of the functions optionally take params to specify where they are (passing to the underlying Lines 47 to 59 in fc18937
So if it's not finding it in the default location, you should pass the location as params, such as this df = ssas_api.get_DAX(
connection_string=conn,
dax_string=dax_string,
amo_path='C:/path/number/one',
adomd_path='C:/path/number/two'
) Example in the code/docstring: Lines 83 to 96 in fc18937
|
That doesn't make sense.
|
The error that I am still getting is the same as what I described above.
|
Hey @nisharncslabs, First of all: The lines 70-73 should be highlighted by your IDE. It reads these imports and looks for matching python packages, which are obviously not available. The imports are loaded through pythonnet from the .DLL files. But this is just a warning and can be safely ignored, because we know why they occur. Now to your error message. I think python is a bit misleading in this case. It reports two exceptions:
Because the second exception is thrown in the except block python shows you both exception. Now to solve the problem: I copied both .dll files (Tabular and AdomdClient) to the root directory of my project. For me this solves the error.
Adjust the paths until you get this script running and then supply the same paths to your first call to one of the python_ssas functions. Hope this helps 😃 |
Hi, I followed the steps in the README.md file and imported the required dll extension (and edited the required version info in the python file path snippet provided as well).
However, once I go to run the a version of the Quickstart I run into an error:
NameError: name 'DataTable' is not defined
.Here is the python file path snippet with the correct version and path that I have on my machine:
My question is:
ssas_api.py
script I have on my local machine (line 70-73) the following commands aren't working (greyed out in PyCharm Editor):Not sure if I need to install a package for this to work. I tried performing
pip install System
but that didn't seem to work, it gave the following errorERROR: Could not find a version that satisfies the requirement System (from versions: none)
The text was updated successfully, but these errors were encountered: