AnalyticalGraphicsInc / STKCodeExamples

Example scripts and applications for automating and developing with STK and STK Engine.
https://support.agi.com/
MIT License
194 stars 136 forks source link

Error in: AzElPolarPlot_comtypes.ipynb #174

Closed elenzing closed 2 years ago

elenzing commented 2 years ago

COMError Traceback (most recent call last) C:\Users\HPZ620~1\AppData\Local\Temp/ipykernel_7984/280915811.py in 36 #Get all the access interval start and stop times 37 accessReport = access.DataProviders.Item("Access Data").QueryInterface(STKObjects.IAgDataPrvInterval) ---> 38 accessIntervals = accessReport.ExecElements(scenario2.StartTime, scenario2.Stoptime, ["Access Number","Start Time", "Stop Time"]) 39 accessIntervals = list(accessIntervals.DataSets.ToArray()) 40 #Get Az El data for each access interval

COMError: (-2147417851, 'The server threw an exception.', (None, None, None, 0, None))

arogersagi commented 2 years ago

Hi there - this seems to be a problem with Python 3.8's compatibility with the comtypes library, which is documented in the comtypes repo here. I would recommend trying this script again with Python 3.7 or creating a new script using the new Python API.

arogersagi commented 2 years ago

Closing for now, will reopen if additional comments are added.