Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to access riid.gadras module #71

Open
tannerdalen opened this issue Sep 26, 2024 · 0 comments
Open

Unable to access riid.gadras module #71

tannerdalen opened this issue Sep 26, 2024 · 0 comments

Comments

@tannerdalen
Copy link

tannerdalen commented Sep 26, 2024

Now that GADRAS-DRF 19.4.0 has 1DM capabilities, I am attempting to use PyRIID to interface with the GADRAS-DRF and generate spectra. I have done so successfully before, provided minor adjustments to riid.gadras.api, but new issues have occurred.

When running the following code block (a small portion of a larger script) in a fresh kernel, the following error is raised:

from riid.gadras.api import GADRAS_API_SEEMINGLY_AVAILABLE
if not GADRAS_API_SEEMINGLY_AVAILABLE:`
    raise Exception("GADRAS-DRF API unavailable. Did something change?")

GADRAS_API = riid.gadras.api.get_gadras_api()
...
FileNotFoundException: Could not load file or assembly 'BitMiracle.LibTiff.NET, Version=2.3.624.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
File name: 'BitMiracle.LibTiff.NET, Version=2.3.624.0, Culture=neutral, PublicKeyToken=null'
   at System.Signature.GetSignature(Void* pCorSig, Int32 cCorSig, RuntimeFieldHandleInternal fieldHandle, IRuntimeMethodInfo methodHandle, RuntimeType declaringType)
   at System.Reflection.RuntimeMethodInfo.FetchNonReturnParameters()
   at System.Reflection.RuntimeMethodInfo.GetParametersNoCopy()
   at System.Reflection.RuntimePropertyInfo.GetIndexParametersNoCopy()
   at System.Reflection.RuntimePropertyInfo.GetIndexParameters()
   at Python.Runtime.ClassManager.GetClassInfo(Type type, ClassBase impl)
   at Python.Runtime.ClassManager.InitClassBase(Type type, ClassBase impl, ReflectedClrType pyType)
   at Python.Runtime.ReflectedClrType.GetOrCreate(Type type)
   at Python.Runtime.ModuleObject.GetAttribute(String name, Boolean guess)
   at Python.Runtime.ModuleObject.LoadNames()
   at Python.Runtime.ImportHook.Import(String modname)
   at Python.Runtime.CLRModule._load_clr_module(PyObject spec)

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

When using the latest PyRIID version on PyPI, simply running the above code again, having made no changes, the script runs as expected with no errors. Odd!

When using the latest PyRIID version on GitHub, running the above code throws another error:

  File ...\path\to\script.py:124
    GADRAS_API = riid.gadras.api.get_gadras_api()

AttributeError: module 'riid' has no attribute 'gadras''

The BitMiracle error is probably another issue altogether. Regardless, how should one go about accessing the riid.gadras module with the latest PyRIID version on GitHub assuming that directly accessing it still remains an appropriate use case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant