-
Notifications
You must be signed in to change notification settings - Fork 3
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
Python bindings don't work correctly in latest version of RStudio without altering Python settings (ModuleNotFoundError) #13
Comments
Hi Ethan, I'm trying to use the rainbow parser in RStudio for Chemstation data file with an ".MS" extension. dat <- chromConverter::read_chroms(path_to_files, format_in = "chemstation", parser = "rainbow") Still after unchecking the box in the above post, I'm getting the following error: Warning in chromConverter::read_chroms(path_to_files, format_in = "chemstation", : I'm pretty sure I've got the right package for Python installed (rainbow-api), and I've told reticulate to use the latest version of Python. (also sorry if this isn't the correct place to ask this question, feel free to move this query somewhere else) Nathan |
Hi Nathan, |
Hi Ethan, No I didn't have miniconda installed, but I do now. I ran the line that you provided, and it gave me the option to install it then, so I did. Output was very long, so I won't post it here. I just ran your line again, here is the ouput: chromConverter::configure_python_environment("rainbow") C:\Users\20373478\OneDrive - Curtin\All R Projects\py-GC-MS Library Searches\py_GC_MS_reports>CALL "C:\Users\20373478\AppData\Local\r-miniconda\condabin\activate.bat" "chromConverter" C:\Users\20373478\OneDrive - Curtin\All R Projects\py-GC-MS Library Searches\py_GC_MS_reports>conda.bat activate "chromConverter" Thank you for your assistance :) |
This seems to be a reticulate configuration issue, since you have rainbow installed in the chromConverter environment, but reticulate isn't finding it. I'm not sure exactly what the issue might be though. Did you restart your R session after installing miniconda and all that? It could be that reticulate has already loaded a different python environment in your R session and can't switch to the chromConverter environment. |
Oh yep okay. Thanks, that is sorted now, I realised I had a line instructing what version of python to use [ reticulate::use_python() ] , so I've commented that out and the script runs.
C:\Users\20373478\OneDrive - Curtin\All R Projects\py-GC-MS Library Searches\py_GC_MS_reports>CALL "C:\Users\20373478\AppData\Local\r-miniconda\condabin\activate.bat" "C:\Users\20373478\AppData\Local\r-miniconda\envs\r-reticulate" C:\Users\20373478\OneDrive - Curtin\All R Projects\py-GC-MS Library Searches\py_GC_MS_reports>conda.bat activate "C:\Users\20373478\AppData\Local\r-miniconda\envs\r-reticulate" The following chromatograms could not be interpreted: 1 Thanks again!! |
Ah, i see. That would do it. Can you send a copy of the file? Could be a format that isn't yet supported by rainbow? (There are multiple .MS formats produced by different versions of chemstation and openlab). Also do you happen to know what version of chemstation the file came from? |
GitHub doesn't like the .MS file type being attached in a comment. What would be your preferred way for me to send it to you? Unfortunately I don't know what version of the software it has come from. I suspect it's pretty old as the GC-MS that we used is fairly old. If it's important to know, I can find out next week what version the computer attached to the GC-MS uses. Thank you Ethan! |
if you want you could email it to me at ***@***.***
…On Fri, Jul 12, 2024 at 12:03 AM nathan-loves-soil ***@***.***> wrote:
GitHub doesn't like the .MS file type being attached in a comment. What
would be your preferred way for me to send it to you?
Unfortunately I don't know what version of the software it has come from.
I suspect it's pretty old as the GC-MS that we used is fairly old. If it's
important to know, I can find out next week what version the computer
attached to the GC-MS uses.
The version that I have on my PC which can read the file is MSD
ChemStation F.01.03.2357.
Thank you Ethan!
—
Reply to this email directly, view it on GitHub
<#13 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADZEBOZ65R22SSSFL6VHXRDZL5ISPAVCNFSM6AAAAABKMX67M6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMRUGQ2DMMRUG4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Hi Nathan, Ethan |
Hi Ethan, I will give that a go this week! I'll let you know how I go with using the entab parser. |
Hey Ethan, just letting you know that the entab parser worked for me! I really appreciated your willingness to help with troubleshooting this with me. Thanks again, Nathan |
Wonderful. Glad to hear it!!
Ethan
…On Tue, Jul 16, 2024 at 4:11 AM nathan-loves-soil ***@***.***> wrote:
Hey Ethan, just letting you know that the entab parser worked for me! I
really appreciated your willingness to help with troubleshooting this with
me. Thanks again, Nathan
—
Reply to this email directly, view it on GitHub
<#13 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADZEBO3OGMOO42FO4PP4S63ZMTIRVAVCNFSM6AAAAABKMX67M6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMZQGI4DMNRVGM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Recent versions of RStudio made some strange changes to the way reticulate functions, as discussed in this thread, which interfere with chromConverter's python bindings. chromConverter will still load but python-based parsers will likely not be available if a project is loaded. When trying to access python parsers, a
module not found
error will be generated. As far as I can tell, this is a bug with RStudio rather than chromConverter (though RStudio developers seem to think this is the expected behavior).This issue can apparently be resolved by unchecking a box in the RStudio settings. To do this, open RStudio settings and navigate to the Python pane (
Tools:Global Options:Python
). Then uncheck the box that says "Automatically activate project-local Python environments" and clickApply
. RStudio must then be restarted for the settings to take effect.The text was updated successfully, but these errors were encountered: