-
Notifications
You must be signed in to change notification settings - Fork 50
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
Exception: Unknown Error code xxxx xxx using R, reticulate and nrel-pysam #150
Comments
Hi! Thanks for your issue report. Unfortunately we don't have the bandwidth to investigate this issue at the moment. Have you had a chance to investigate whether the issue is your version of Linux, or the interaction with reticulate? |
Consistent across:
It's definitely an issue with interacting with reticulate as keeping everything in python works consistently well. It's also, I think, limited to an issue with loading compute modules. I can load PySSC and the ResourceTools classes just fine. I'll note really quickly that since there's no R interface for the SSC library, without needing to do a ton of C++ programming, I think interacting with the SSC this way is an R programmer's best bet. |
Thanks for the additional detail! @sjanzou , can you think of anything else that would be OS specific to try? |
Without actually installing and duplicating the issue, building on the discussion at: rstudio/reticulate#1369 I would look at how the PySAM_TECH_ATTR() macro in pysam/src/PySAM_utils.h plays with the R new operator and garbage collection The new_error() function mentioed is a cpython function defined by Hope this helps to debug... |
This issue is cross-listed on the GitHub page for reticulate: rstudio/reticulate#1369 . The gist is, I cannot call any compute modules in PySAM using reticulate, on Linux (it seems to work properly on windows, and mac is untested).
However what does work is
Original Issue
I'm attempting to use reticulate within R to interface with NREL's SAM library via PySAM (nrel-pysam on pypi); however, I cannot interface with any of the compute modules, resulting in an error that says simply:
Though the exact code changes each time I run it, making me think it has something to do with RAM addressing.
Here's an example of what I've tried, using AlmaLinux 9.1 (a clean, fresh install), which comes with python version 3.9:
a full traceback yields something that looks like
I have attempted to do more or less the following on a variety of OSes (Fedora 38, Ubuntu 20.04, AlmaLinux 9.1 to name a fiew) with a variety of python versions (3.8 - 3.11), I've tried both the CRAN version of reticulate and the current (as of 2023-05-08) main branch version on Github, I've installed nrel-pysam with pip and with conda (not having both at the same time of course), have only ever seen this error message. Here's a sample session info:
Happy to include any/all other information as necessary.
The text was updated successfully, but these errors were encountered: