S-C-O-U-T / Pyadomd

A pythonic approach to query SSAS data models.
https://pyadomd.readthedocs.io/en/latest/index.html
Apache License 2.0
25 stars 6 forks source link

DllNotFoundException: security.dll #2

Closed IcToxi closed 4 years ago

IcToxi commented 4 years ago

Hi,

When I tried to access Analysis Services on Centos, I encountered DllNotFoundException: security.dll exception.

And copying this dll from Windows also doesn't work.

from sys import path
path.append('/usr/local/bin/') # which is dll files path

import pandas as pd
from pyadomd import Pyadomd

conn_str = "Provider=MSOLAP;DataSource=xxx.xxx;Catalog=xx;Integrated Security=SSPI;Persist Security Info=True;User ID=xxx;Password=***;"
query = '''

MDX Scripts...

'''

with Pyadomd(conn_str) as conn:
    with conn.cursor().execute(query) as cur:
        df = pd.DataFrame(cur.fetchone(),
                          columns=[i.name for i in cur.description])

Do you have any ideas?

S-C-O-U-T commented 4 years ago

Are you running the script on windows?

At which line do you get the exception?

Have you tried to install the Adomd client dll from Microsoft webside? https://www.microsoft.com/en-us/download/details.aspx?id=55992

The package only works with windows, unfortunately. Do to the underlying dependencies. I will state that more clearly in the readme file.

IcToxi commented 4 years ago

Hi, I think I know what I'm doing, and I've also tried to use pythonnet directly, as well as installing .net runtime. The system version is Centos 7 and python is 3.7. But I don't think this is a problem specific to a particular version. It looks like my Centos are missing a series of components from Windows security validation, but I don't know how to import, copying DLLs directly from Windows doesn't work, and I can't find similar issues on sites like StackOverFlow, so I'd like to ask if you've studied this.

S-C-O-U-T commented 4 years ago

I’ve only tested it on windows.

My plan is to test if I can get to work on UNIX-like system by using Mono https://www.mono-project.com/ but I haven’t got to it yet. Pythonnet should work with the Mono runtime, so hopefully it could also be possible to get Pyadomd to do so.

IcToxi commented 4 years ago

Thank you very much, I don't know much about C#.

I've seen Mono run as a dependency library, just I'm stuck in Windows authentication.

I hope your plan will succeed.