You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just tried to set up pyEPR with Ansys on a new PC. Created a new environment and installed all required packages. Now, when I try to connect to Ansys with epr.ProjectInfo,
pinfo = epr.ProjectInfo(project_path = os.getcwd(),
project_name = 'TripleCats',)
it connects to Ansys and finds the correct file path, but then spits out this error
com_error Traceback (most recent call last)
~\anaconda3\envs\pyEPR\lib\site-packages\win32com\client\dynamic.py in _GetGoodDispatch(IDispatch, clsctx)
88 try:
---> 89 IDispatch = pythoncom.connect(IDispatch)
90 except pythoncom.ole_error:
com_error: (-2147221005, 'Invalid class string', None, None)
During handling of the above exception, another exception occurred:
com_error Traceback (most recent call last)
<ipython-input-3-f7191f53f00d> in <module>
----> 1 pinfo = epr.ProjectInfo(project_path = os.getcwd(),
2 project_name = 'TripleCats',)
~\anaconda3\envs\pyEPR\lib\site-packages\pyEPR\project_info.py in __init__(self, project_path, project_name, design_name, setup_name, do_connect)
209
210 if do_connect:
--> 211 self.connect()
212 self.dissipative['pinfo'] = self
213
~\anaconda3\envs\pyEPR\lib\site-packages\pyEPR\project_info.py in connect(self)
343 """
344
--> 345 self.connect_project()
346 if not self.project:
347 logger.info('\tConnection to Ansys NOT established. \n')
~\anaconda3\envs\pyEPR\lib\site-packages\pyEPR\project_info.py in connect_project(self)
239 logger.info('Connecting to Ansys Desktop API...')
240
--> 241 self.app, self.desktop, self.project = ansys.load_ansys_project(
242 self.project_name, self.project_path)
243
~\anaconda3\envs\pyEPR\lib\site-packages\pyEPR\ansys.py in load_ansys_project(proj_name, project_path, extension)
3092 )
3093
-> 3094 app = HfssApp()
3095 logger.info("\tOpened Ansys App")
3096
~\anaconda3\envs\pyEPR\lib\site-packages\pyEPR\ansys.py in __init__(self, ProgID)
379 '''
380 super(HfssApp, self).__init__()
--> 381 self._app = Dispatch(ProgID)
382
383 def get_app_desktop(self):
~\anaconda3\envs\pyEPR\lib\site-packages\win32com\client\__init__.py in Dispatch(dispatch, userName, resultCLSID, typeinfo, UnicodeToString, clsctx)
93 """
94 assert UnicodeToString is None, "this is deprecated and will go away"
---> 95 dispatch, userName = dynamic._GetGoodDispatchAndUserName(dispatch,userName,clsctx)
96 return __WrapDispatch(dispatch, userName, resultCLSID, typeinfo, clsctx=clsctx)
97
~\anaconda3\envs\pyEPR\lib\site-packages\win32com\client\dynamic.py in _GetGoodDispatchAndUserName(IDispatch, userName, clsctx)
112 else:
113 userName = str(userName)
--> 114 return (_GetGoodDispatch(IDispatch, clsctx), userName)
115
116 def _GetDescInvokeType(entry, invoke_type):
~\anaconda3\envs\pyEPR\lib\site-packages\win32com\client\dynamic.py in _GetGoodDispatch(IDispatch, clsctx)
89 IDispatch = pythoncom.connect(IDispatch)
90 except pythoncom.ole_error:
---> 91 IDispatch = pythoncom.CoCreateInstance(IDispatch, None, clsctx, pythoncom.IID_IDispatch)
92 else:
93 # may already be a wrapped class.
com_error: (-2147221005, 'Invalid class string', None, None)
There was the same problem for the previous setup, which could be resolved by reinstalling everything from scratch. Ideas for an easier fix?
The text was updated successfully, but these errors were encountered:
I just tried to set up pyEPR with Ansys on a new PC. Created a new environment and installed all required packages. Now, when I try to connect to Ansys with epr.ProjectInfo,
pinfo = epr.ProjectInfo(project_path = os.getcwd(),
project_name = 'TripleCats',)
it connects to Ansys and finds the correct file path, but then spits out this error
There was the same problem for the previous setup, which could be resolved by reinstalling everything from scratch. Ideas for an easier fix?
The text was updated successfully, but these errors were encountered: