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

Persistent warning about OPENMS_DATA_PATH #129

Closed
vrkosk opened this issue Mar 22, 2024 · 4 comments
Closed

Persistent warning about OPENMS_DATA_PATH #129

vrkosk opened this issue Mar 22, 2024 · 4 comments
Assignees
Labels
upstream Issue in upstream dependency

Comments

@vrkosk
Copy link

vrkosk commented Mar 22, 2024

I'm getting a persistent warning about OPENMS_DATA_PATH when I use ms2rescore.feature_generators.ms2pip.MS2PIPFeatureGenerator from a Python script.

Here's how I create the environment:

C:\python\python309\python.exe -m venv venv_309_ms2rescore
venv_309_ms2rescore\Scripts\pip3 install ms2rescore==3.0.2

The script is the same as in issue #128. When I use the workaround (only output deltas in ProForma strings), there's a warning every time I run MS2PIPFeatureGenerator:

Calculating features... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━   0% -:--:--Warning: OPENMS_DATA_PATH environment variable already exists. pyOpenMS will use it (C:\Users\villek\tmp\venv_309_ms2rescore\lib\site-packages\pyopenms\share/OpenMS) to locate data in the OpenMS share folder (e.g., the unimod database), instead of the default (C:\Users\villek\tmp\venv_309_ms2rescore\lib\site-packages\pyopenms\share/OpenMS).

The directory paths are identical so I'm assuming the warning is harmless. But how and where do I suppress this warning?

@RalfG
Copy link
Member

RalfG commented Mar 28, 2024

Hi @vrkosk,

There is indeed no issue with the paths that are set, but I agree that the wall of warnings are reasonably annoying. Unfortunately, pyOpenMS uses print to write this warning, so there is currently no clean way to suppress it. There has been some discussion on this issue (OpenMS/OpenMS#6979), but no actions were taken. I'll see if the pyOpenMS maintainers would consider reopening the PR.

Best,
Ralf

@RalfG RalfG added the upstream Issue in upstream dependency label Mar 28, 2024
@RalfG
Copy link
Member

RalfG commented Mar 28, 2024

I proposed changes to OpenMS to fix the issue (OpenMS/OpenMS#7418). If accepted, I can filter the warnings upstream in psm_utils (compomics/psm_utils#74).

@RalfG RalfG self-assigned this Mar 28, 2024
@vrkosk
Copy link
Author

vrkosk commented Mar 28, 2024

That's great, thanks!

@RalfG
Copy link
Member

RalfG commented Mar 29, 2024

OpenMS/OpenMS#7418 has been merged, so a fix should be part of the next pyOpenMS version. Filtering of the warnings is now also implemented at the level of psm_utils (compomics/psm_utils#74).

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

No branches or pull requests

2 participants