may-day / olap

Python package to access OLAP data sources.
63 stars 47 forks source link

Cannot see tabular models on my SSAS server using XMLA0.7.2 #17

Closed onlineankitgupta closed 4 years ago

onlineankitgupta commented 4 years ago

I am able to query SSAS tabular model using other clients over http but with XMLA0.7.2 Package I am not able to see my catalog, following is the error I get.

import olap.xmla.xmla as xmla provider = xmla.XMLAProvider() connect = provider.connect(location=‘http://101.101.101.27/ankit/msmdpump.dll',username='test_user',password='') source = connect.getOLAPSource() print(source.getCatalog("AdvenrureWorks2012-1200")) Traceback (most recent call last): File "/home/ankigupt/pythonxmla1/olap/xmla/olap/xmla/connection.py", line 153, in Discover doc=self.service.Discover(RequestType=what, Restrictions=rl, Properties=pl, _soapheaders=self._soapheaders) File "/home/ankigupt/pythonxmla1/lib/python3.6/site-packages/zeep/proxy.py", line 45, in call kwargs, File "/home/ankigupt/pythonxmla1/lib/python3.6/site-packages/zeep/wsdl/bindings/soap.py", line 130, in send return self.process_reply(client, operation_obj, response) File "/home/ankigupt/pythonxmla1/lib/python3.6/site-packages/zeep/wsdl/bindings/soap.py", line 195, in process_reply return self.process_error(doc, operation) File "/home/ankigupt/pythonxmla1/lib/python3.6/site-packages/zeep/wsdl/bindings/soap.py", line 287, in process_error detail=etree_to_string(doc), zeep.exceptions.Fault: Unknown fault occured

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "", line 1, in File "/home/ankigupt/pythonxmla1/olap/xmla/olap/xmla/xmla.py", line 156, in getCatalog aslist=unique_name==None) File "/home/ankigupt/pythonxmla1/olap/xmla/olap/xmla/xmla.py", line 112, in getSchemaElements props = func(r, properties) File "/home/ankigupt/pythonxmla1/olap/xmla/olap/xmla/connection.py", line 93, in *args, **kw) File "/home/ankigupt/pythonxmla1/olap/xmla/olap/xmla/connection.py", line 159, in Discover raise XMLAException(fault.message, dictify(fromETree(fault.detail, ns=None))) File "/home/ankigupt/pythonxmla1/olap/xmla/olap/xmla/utils.py", line 143, in fromETree for (k,v) in e.attrib.items(): AttributeError: 'bytes' object has no attribute 'attrib'

Anything missing from my side?

onlineankitgupta commented 4 years ago

I am able to fetch data from MDX query now on my tabular model, not sure what made the difference. print(source.getCatalog("AdvenrureWorks2012-1200"))

onlineankitgupta commented 4 years ago

This issue comes with Windows machine, I moved to Ubuntu where it works so closing the bug.

CrasCris commented 1 month ago

Can you show the code fixed it ? what this url mean ? "‘[http://101.101.101.27/ankit/msmdpump.dll']"