Closed hsahire closed 2 years ago
Hi @hsahire, thank you for reporting this issue!
Can you confirm you have the BoM Analytics service installed in your MI Service Layer? There are two ways to check this:
If those steps don't work, you will need to install the RS Reports Bundle, which will install BomAnalyticsServices. There is currently not an official release of this for 2022 R2, but you should be able to find the RS bundle available for 2022 R1 under the "Materials Supplimentary" heading on the Customer Portal.
Hi @Andy-Grigg thanks for the help. I am able to run the analytics using latest version of RS Reports Bundle
Closing, will be resolved by #215
🔍 Before submitting the issue
🐞 Description of the bug
unable to get the result object from the sample example and getting following error
_Traceback (most recent call last): File "D:\users\consult\2022\resmed\phase1\bom_analyzer_pyansys.py", line 5, in
result = cxn.run(query)
File "D:\users\consult\2022\resmed\phase1\venv\lib\site-packages\ansys\grantami\bomanalytics_connection.py", line 319, in run
return query._run_query(api_instance=api_instance, static_arguments=self._query_arguments)
File "D:\users\consult\2022\resmed\phase1\venv\lib\site-packages\ansys\grantami\bomanalytics\queries.py", line 741, in _run_query
self._call_api(api_method, arguments)
File "D:\users\consult\2022\resmed\phase1\venv\lib\site-packages\ansys\grantami\bomanalytics\queries.py", line 521, in _call_api
response = api_method(request)
File "D:\users\consult\2022\resmed\phase1\venv\lib\site-packages\ansys\grantami\bomanalytics_openapi\api\impacted_substances_api.py", line 114, in post_impactedsubstances_materials
(data) = self.post_impactedsubstances_materials_with_http_info(body, **kwargs) # noqa: E501
File "D:\users\consult\2022\resmed\phase1\venv\lib\site-packages\ansys\grantami\bomanalytics_openapi\api\impacted_substances_api.py", line 170, in post_impactedsubstances_materials_with_http_info
return self.api_client.call_api(
File "D:\users\consult\2022\resmed\phase1\venv\lib\site-packages\ansys\openapi\common_api_client.py", line 432, in call_api
return self.__call_api(
File "D:\users\consult\2022\resmed\phase1\venv\lib\site-packages\ansys\openapi\common_api_client.py", line 166, in __call_api
response_data = self.request(
File "D:\users\consult\2022\resmed\phase1\venv\lib\site-packages\ansys\openapi\common_api_client.py", line 518, in request
return handle_response(
File "D:\users\consult\2022\resmed\phase1\venv\lib\site-packages\ansys\openapi\common_util.py", line 412, in handle_response
raise ApiException.from_response(response)
ansys.openapi.common.exceptions.ApiException: ApiException(404, 'Not Found')
HTTP response headers: {'Cache-Control': 'private', 'Server': 'Microsoft-IIS/10.0', 'Persistent-Auth': 'true', 'X-Frame-Options': 'SAMEORIGIN', 'X-Content-Type-Options': 'nosniff', 'Strict-Transport-Security': 'max-age=31536000', 'Date': 'Wed, 27 Jul 2022 14:44:13 GMT', 'Content-Length': '0'}
📝 Steps to reproduce
from ansys.grantami.bomanalytics import Connection, queries server_url = "http://PUNHSAHIRE/mi_servicelayer" cxn = Connection(server_url).with_autologon().connect() query = queries.MaterialImpactedSubstancesQuery().with_material_ids(["plastic-abs-high-impact"]).with_legislations(["REACH - The Candidate List"]) result = cxn.run(query)
💻 Which operating system are you using?
Windows
🐍 Which Python version are you using?
3.10
📦 Installed packages