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

python3 setup.py test failed with 8 ERRORs #16

Open
matthias-heuberger opened this issue Apr 14, 2022 · 3 comments
Open

python3 setup.py test failed with 8 ERRORs #16

matthias-heuberger opened this issue Apr 14, 2022 · 3 comments

Comments

@matthias-heuberger
Copy link

Hello,

I using setup.py test to test if the tool is installed properly. I have installed all the specified requirements. I get the following error message (for all of the tests):

ERROR: test_results (unittest.loader._FailedTest)

ImportError: Failed to import test module: test_results
Traceback (most recent call last):
File "/home/wicker/anaconda3/lib/python3.8/unittest/loader.py", line 436, in _find_test_path
module = self._get_module_from_name(name)
File "/home/wicker/anaconda3/lib/python3.8/unittest/loader.py", line 377, in _get_module_from_name
import(name)
File "/home/wicker/data1/matthias/IBSPY_test/IBSpy/tests/test_results.py", line 12, in
from IBSpy import IBSpyResults
File "/home/wicker/data1/matthias/IBSPY_test/IBSpy/IBSpy/init.py", line 8, in
from .IBSpy_result_set import IBSpyResultsSet
File "/home/wicker/data1/matthias/IBSPY_test/IBSpy/IBSpy/IBSpy_result_set.py", line 15, in
from .IBSpy_values_matrix import IBSpyValuesMatrix
File "/home/wicker/data1/matthias/IBSPY_test/IBSpy/IBSpy/IBSpy_values_matrix.py", line 17, in
class IBSpyValuesMatrix:
File "/home/wicker/data1/matthias/IBSPY_test/IBSpy/IBSpy/IBSpy_values_matrix.py", line 142, in IBSpyValuesMatrix
def merged_values(self) -> dict[str, pysam.TabixFile]:
TypeError: 'type' object is not subscriptable

@homonecloco
Copy link
Member

Hi Matthias,

Which commit are you using? Can you try installing this release:

https://github.com/Uauy-Lab/IBSpy/tree/0.4.6
https://github.com/Uauy-Lab/IBSpy/releases/tag/0.4.6

This issue happens because I'd been trying different ways to make some of the long running process run in parallel.
Please bear in mind that I'm still doing some optimisations and not all the tags are stable (sometimes I find out errors that only happen when I run a large test).

Best,
Ricardo.

@matthias-heuberger
Copy link
Author

Hi Ricardo,

Thank you very much for your reply and the feedback. I tried to install the 0.4.6 release. Maybe one of the following two error/warning messages helps to resolve the problem:

~/IBSpy-0.4.6$ python3 setup.py develop

running develop
/home/wicker/anaconda3/lib/python3.8/site-packages/setuptools/command/easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
/home/wicker/anaconda3/lib/python3.8/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running egg_info
writing IBSpy.egg-info/PKG-INFO
writing dependency_links to IBSpy.egg-info/dependency_links.txt
writing entry points to IBSpy.egg-info/entry_points.txt
writing top-level names to IBSpy.egg-info/top_level.txt
reading manifest file 'IBSpy.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*.py' under directory 'IBSPy'
warning: no previously-included files matching '.DS_Store' found anywhere in distribution
adding license file 'LICENSE'
writing manifest file 'IBSpy.egg-info/SOURCES.txt'
running build_ext
copying build/lib.linux-x86_64-3.8/kmerGWAS.cpython-38-x86_64-linux-gnu.so ->
Creating /home/wicker/anaconda3/lib/python3.8/site-packages/IBSpy.egg-link (link to .)
IBSpy 0.4.6 is already the active version in easy-install.pth
Installing IBSplot script to /home/wicker/anaconda3/bin
Installing IBSpy script to /home/wicker/anaconda3/bin
Installing IBSpy_haplotypes script to /home/wicker/anaconda3/bin
Installing IBSpy_matrix script to /home/wicker/anaconda3/bin
Installing IBSpy_wcount script to /home/wicker/anaconda3/bin

Installed /home/wicker/IBSpy-0.4.6
Processing dependencies for IBSpy==0.4.6
Finished processing dependencies for IBSpy==0.4.6

~/IBSpy-0.4.6$ IBSpy --help

Traceback (most recent call last):
File "/home/wicker/anaconda3/bin/IBSpy", line 33, in
sys.exit(load_entry_point('IBSpy', 'console_scripts', 'IBSpy')())
File "/home/wicker/anaconda3/bin/IBSpy", line 25, in importlib_load_entry_point
return next(matches).load()
File "/home/wicker/anaconda3/lib/python3.8/importlib/metadata.py", line 77, in load
module = import_module(match.group('module'))
File "/home/wicker/anaconda3/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "", line 843, in exec_module
File "", line 219, in _call_with_frames_removed
File "/home/wicker/IBSpy-0.4.6/IBSpy/init.py", line 8, in
from .IBSpy_result_set import IBSpyResultsSet
File "/home/wicker/IBSpy-0.4.6/IBSpy/IBSpy_result_set.py", line 15, in
from .IBSpy_values_matrix import IBSpyValuesMatrix
File "/home/wicker/IBSpy-0.4.6/IBSpy/IBSpy_values_matrix.py", line 17, in
class IBSpyValuesMatrix:
File "/home/wicker/IBSpy-0.4.6/IBSpy/IBSpy_values_matrix.py", line 142, in IBSpyValuesMatrix
def merged_values(self) -> dict[str, pysam.TabixFile]:
TypeError: 'type' object is not subscriptable

I also double-checked that I installed all the requirements. Let me know if there is any further information that might help.

Best wishes and thank you again!

Matthias

@homonecloco
Copy link
Member

Hi Matthias,
Thanks for sending the details. There are two differences between your environment and how I setup in our linux environment.

  1. For development I use pyenv directly, without using anaconda. In the cluster I use a singularity image on the "native" python.
  2. I had some issues using python older than 3.9, because I'm using some code hints that I think are not present on previous versions. The error you get is for something different, though.

I just uploaded the definition for the singularity container that I used to install the version I'm currently running in our infrastructure.
https://github.com/Uauy-Lab/IBSpy/blob/main/containers/singularity-IBSpy-0.4.6.def

Having said that, I haven't tested recently the "develop" command on a fresh install. I need to get a hold on a linux development VM/machine to see if I can replicate this, but I can promise it will happen soon. If you still have issues, we may e able to share the singularity image (but it is around 500Mb, and need to think on the logistics on getting that file out of the cluster)

Best,
Ricardo.

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

No branches or pull requests

2 participants