-
Notifications
You must be signed in to change notification settings - Fork 330
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
r_to_py leading to matrix error in versions >1.3.5 when using python library metas_unclib #1676
Comments
Hi, can you please provide instructions for how to install "metas_unclib"? I tried ModuleNotFoundError: No module named 'clr' then I tried > unc <- import("metas_unclib")
Error in py_module_import(module, convert = convert) :
AttributeError: module 'clr' has no attribute 'AddReference' |
Hello,
Sorry for the missing instructions… here some details.
***@***.***
The library can be found here: https://pypi.org/project/metas-unclib/
And an msi-installer here: https://www.metas.ch/metas/en/home/fabe/hochfrequenz/unclib.html
Thank you!
From: Tomasz Kalinowski ***@***.***>
Sent: Mittwoch, 25. September 2024 15:20
To: rstudio/reticulate ***@***.***>
Cc: Fritsche Johannes METAS ***@***.***>; Author ***@***.***>
Subject: Re: [rstudio/reticulate] r_to_py leading to matrix error in versions >1.3.5 when using python library metas_unclib (Issue #1676)
Hi, can you please provide instructions for how to install "metas_unclib"?
I tried py_install("metas_unclib") and encountered error:
ModuleNotFoundError: No module named 'clr'
then I tried py_install("clr") and encountered error:
unc <- import("metas_unclib")
Error in py_module_import(module, convert = convert) :
AttributeError: module 'clr' has no attribute 'AddReference'
—
Reply to this email directly, view it on GitHub<#1676 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BLSHCUSETBF52UVD4HROKHTZYKZ6JAVCNFSM6AAAAABO2ELRHWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNZUGA3DOMZUGY>.
You are receiving this because you authored the thread.Message ID: ***@***.******@***.***>>
|
My best guess is that this is due to NumPy 2.0. Have you tried installing older versions of NumPy (and Scipy, and possibly other packages)? |
I've also tested this with NumPy 1.26, with the same result. Metas_unclib has no other dependency, as far as I know.
Tracing the error back, it appear at
r_to_py_impl(x, convert = convert)
I can stick to reticulate 1.35, which works fine…. It may just be an issue with later package distribution.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For reticulate version >1.3.5 (on R 4.4.1) r_to_py leads to a matrix error when using with the python library metas_unclib. This library returns values with uncertainties as shown in the example below. In version 1.3.5 the matrix conversion was working correctly.
which returns
[1.0 ± 0.0, 2.0 ± 0.0, 3.0 ± 0.0]
The matrix conversion for metas_unclib objects may have been depricated by later reticulate versions.
The text was updated successfully, but these errors were encountered: