VarianAPIs / PyESAPI

Python interface to Eclipse Scripting API
MIT License
75 stars 33 forks source link

File Not Found Exception #9

Closed CodeSmith92 closed 5 years ago

CodeSmith92 commented 5 years ago

Hi,

I've encountered an error I can't get around when trying to go through the "Getting Started" Jupyter notebook. I've attached an image of the error. The .dll file "VMS.TPS.Common.Model.API" is in the ESAPI_PATH that I set, but for some reason the file isn't being found. Do you know why this is happening? Any help fixing this issue would be greatly appreciated.

Thank you! Dylan

PyEsapiError

fizxmike commented 5 years ago

Try escaping the backslash: 'C:\FilePath'

Also, setting ESAPI_PATH should not be required for standard TBOX install. What environment/system are you working in?

CodeSmith92 commented 5 years ago

Unfortunately, escaping the backslash didn't work.

I have a windows 10 desktop (64-bit operating system) connected to the University of Michigan Medical Network. For Python coding I use VS Code, but I'm accessing the Jupyter notebooks through Anaconda.

What exactly is a TBOX? A colleague of mine installed all the necessary files from a flash drive of his. All the .dll files (and .exe files) are version 15.6.999.999

Do you think this is perhaps because I didn't execute: curl -O https://raw.githubusercontent.com/VarianAPIs/PyESAPI/master/condaenv36.yml prior to creating the conda environment? When I tried to execute the above command, I was denied permission.

fizxmike commented 5 years ago

ESAPI provides an interface to the Eclipse application. At runtime, it's required that Eclipse is installed on the same computer as PyESAPI... What is "not found" are probably the core Eclipse application libraries. A TBOX is a self contained test Eclipse environment.

vinaysaini94 commented 3 months ago

I have the latest update regarding the compatibility issue due to the pythonnet current version available in the market:

Resolution: To work with Python version 3.8-3.10 using pythonnet 3.0.3, you need to configure pythonnet to use the .NET Framework instead of .NET Core. This is done by setting the PYTHONNET_CLRBITS environment variable.

Steps to Set Environment Variable:

On Windows:

  1. Open a command prompt (cmd) or PowerShell window.
  2. Set the environment variable:
    set PYTHONNET_CLRBITS=CLR

On Anaconda Jupyter Notebook (assuming environment name is "python18062024"):

  1. Open Anaconda Prompt.
  2. Ensure your environment ("python18062024") is activated.
  3. Set the environment variable:
    conda env config vars set PYTHONNET_CLRBITS=CLR --name python18062024
  4. Verify the environment variable:
    conda env config vars list --name python18062024

Conclusion: By following these steps, you can resolve the compatibility issue and ensure pythonnet 3.0.3 functions correctly with Python versions 3.8-3.10, utilizing the .NET Framework for your environment.

So, by doing this, that import pyesapi error will resolved.