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

Error running openrdp #89

Closed
PaulaPrietoOliveira opened this issue May 7, 2024 · 13 comments
Closed

Error running openrdp #89

PaulaPrietoOliveira opened this issue May 7, 2024 · 13 comments
Assignees
Labels
bug Something isn't working

Comments

@PaulaPrietoOliveira
Copy link

Dear Sir or Madam,

I hope you are well.

I'm having trouble running Openrdp on my MacBook. I can't run BootScam. I am attaching the error that I found when I run the command openrdp -c default.ini -m bootscan -q short.fasta. The file is called bootscan.error.txt.

Details that may help:
I'm using macOS Sonoma 14.4.1 (23E224)
My Python version is Python 3.10.13
I got OpenRDP from GitHub with git clone https://github.com/PoonLab/OpenRDP
I installed OpenRDP by following README.md with sudo python3 setup.py install

Thank you for your attention.

Best regards,
Paula Prieto Oliveira

bootscan.error.txt

@deve105
Copy link

deve105 commented May 10, 2024

Hi there, I got the same error.
But I did use instead

python3 -m pip install .

DE

@ArtPoon
Copy link
Collaborator

ArtPoon commented May 10, 2024

Hi @PaulaPrietoOliveira and @deve105 - sorry for the delay in responding to this issue. I did have a look through the error log that you provided. There are two exceptions:

ImportError: cannot import name 'Sequence' from 'collections' (/Users/_____/anaconda3/lib/python3.10/collections/__init__.py)

and:

  File "/Users/_____/anaconda3/lib/python3.10/site-packages/numpy/__init__.py", line 135, in <module>
    raise ImportError(msg) from e
ImportError: Error importing numpy: you should not try to import numpy from
        its source directory; please exit the numpy source tree, and relaunch
        your python interpreter from there.
    raise ImportError(msg) from e

Can you please provide the version number for your local installs of NumPy and Anaconda?

@ArtPoon
Copy link
Collaborator

ArtPoon commented May 10, 2024

@PaulaPrietoOliveira what happens if you try a user-level install with python3 setup.py install --user? Might be version discordance between whatever is loaded by superuser and your local installs of package dependencies.

@ArtPoon
Copy link
Collaborator

ArtPoon commented May 10, 2024

I was not able to reproduce this error on desktop running macOS Sonoma 14.3.1 with Python 3.11.5:

(venv) art@Wernstrom OpenRDP % openrdp -c openrdp/default.ini -m bootscan -q tests/short.fasta
/Users/art/venv/bin/openrdp:4: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  __import__('pkg_resources').run_script('OpenRDP==0.1.0', 'openrdp')
Invalid option for 'window_size'.
Using default value (200) instead.

Method  	Start	End	Recombinant	Parent1	Parent2	Pvalue
------------------------------------------------------------------------

(venv) art@Wernstrom OpenRDP % 

@ArtPoon
Copy link
Collaborator

ArtPoon commented May 10, 2024

Turns out this system is just filthy with Python installs. Based on what I could find browsing the web for related problems, I tried calling the above import statement from System Python:

(venv) art@Wernstrom OpenRDP % /usr/bin/python3 -V
Python 3.9.6
(venv) art@Wernstrom OpenRDP % /usr/bin/python3 -c "from collections import Sequence"
<string>:1: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.10 it will stop working

I also have 3.10 and 3.11 under /usr/local/bin:

(venv) art@Wernstrom OpenRDP % /usr/local/bin/python3.10 -c "from collections import Sequence"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: cannot import name 'Sequence' from 'collections' (/usr/local/Cellar/python@3.10/3.10.13/Frameworks/Python.framework/Versions/3.10/lib/python3.10/collections/__init__.py)
(venv) art@Wernstrom OpenRDP % /usr/local/bin/python3.11 -c "from collections import Sequence"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: cannot import name 'Sequence' from 'collections' (/usr/local/Cellar/python@3.11/3.11.5/Frameworks/Python.framework/Versions/3.11/lib/python3.11/collections/__init__.py)

Of course, this makes me question how I was able to run this with 3.11 (my venv install) without throwing this ImportError

@ArtPoon
Copy link
Collaborator

ArtPoon commented May 10, 2024

Hm, we're not even calling this import - this is a NumPy thing. Getting your NumPy version number will be helpful:

(venv) art@Wernstrom OpenRDP % python
Python 3.11.5 (main, Aug 24 2023, 15:18:16) [Clang 14.0.3 (clang-1403.0.22.14.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> numpy.__version__
'1.26.0'

@ArtPoon ArtPoon added the bug Something isn't working label May 10, 2024
@PaulaPrietoOliveira
Copy link
Author

PaulaPrietoOliveira commented May 13, 2024 via email

@ArtPoon
Copy link
Collaborator

ArtPoon commented May 14, 2024

Glad to hear that you got things working @PaulaPrietoOliveira. However it would be really helpful if you could provide the version numbers of NumPy and pathlib that you were trying to run in your anaconda instance, so we can resolve this issue.

@PaulaPrietoOliveira
Copy link
Author

PaulaPrietoOliveira commented May 17, 2024 via email

@ArtPoon
Copy link
Collaborator

ArtPoon commented May 21, 2024

Thanks @PaulaPrietoOliveira - can I also trouble you for your pathlib version as well?

@PaulaPrietoOliveira
Copy link
Author

PaulaPrietoOliveira commented May 24, 2024 via email

@ArtPoon
Copy link
Collaborator

ArtPoon commented Jun 4, 2024

@GopiGugan to create a venv with these versions to attempt a repro

@GopiGugan
Copy link
Collaborator

I wasn't able to reproduce this issue in a virtual environment:

[gopigugan] openrdp -c openrdp/default.ini -m bootscan -q tests/short.fasta                                                                                   
openrdp/bin/openrdp:4: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  __import__('pkg_resources').run_script('OpenRDP==0.1.0', 'openrdp')
Invalid option for 'window_size'.
Using default value (200) instead.

Method  	Start	End	Recombinant	Parent1	Parent2	Pvalue
------------------------------------------------------------------------


[gopigugan] python3                                                                                                                                           
Python 3.10.13 | (main, Dec 23 2023, 15:35:25) [Clang 16.0.6 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> numpy.__version__
'1.24.3'

@PaulaPrietoOliveira - if possible, can you please activate your conda environment, run the following command: conda env export > environment.yml and share the generated environment.yml file? This way we can replicate your environment and try reproducing this issue.

@ArtPoon ArtPoon closed this as completed Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants