Jashcraf / poke

Poke (pronounced poh-keh) is a Polarization Ray Tracing and Gaussian Beamlet module for Python
BSD 3-Clause "New" or "Revised" License
32 stars 6 forks source link

import zosapi crashes ipython kernel??? #4

Closed Jashcraf closed 10 months ago

Jashcraf commented 1 year ago

I think this has been on the backburner long enough. Let's revisit this problem so that we can use BatchRayTrace.dll.

Here's a snippet from MichaelH

_"I think the problem is there is a significant change in the ZOSAPI_Interfaces DLL between when the RayTrace.dll was compiled & uploaded vs the version of OpticStudio that you are trying to run. I would suggest unzipping the BatchRayTrace_VisualStudioSolution, opening up the .sln file, adding the updated references for the ZOSAPI.dll and ZOSAPIInterfaces.dll, and recompile the RayTrace.dll."

Here's the .sln file. It contains no apparent references to the ZOSAPI_Interfaces.

image

If we go one folder deeper, I found a .csproj file that had some encouraging text.

image

Let's look at where these might be. We might be able to get rid of the ZOSAPI.dll files in poke altogether.

Jashcraf commented 1 year ago
image

Same ZOSAPI

Jashcraf commented 1 year ago

This one is correct

image
Jashcraf commented 1 year ago
image

This is where the zosapi package says it is stored

Jashcraf commented 1 year ago

Looking more at it, it looks like every time the connection happens it installs the ZOSAPI.dll and ZOSAPI_Interfaces.dll or something? I wonder if we can watch that happen. Regardless, it may be sufficient to just re-build raytrace.dll with the updated directory.

image
Jashcraf commented 10 months ago

Fixed a while ago, just need to wake up the zosapi in the ipykernel