-
Notifications
You must be signed in to change notification settings - Fork 7
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
Unknown format code 'd' for object of type 'float' #41
Comments
The failed test looks like it's related to pandas version 0.21. $ pip list
Package Version
--------------- -------
genipe 1.3.3
Jinja2 2.10
MarkupSafe 1.0
numpy 1.13.3
pandas 0.21.0
pip 9.0.1
pyfaidx 0.5.1
python-dateutil 2.6.1
pytz 2017.3
setuptools 36.6.0
six 1.11.0
$ python -m unittest genipe.tests.test_imputed_stats.TestImputedStats.test_read_phenotype
E
======================================================================
ERROR: test_read_phenotype (genipe.tests.test_imputed_stats.TestImputedStats)
Tests the 'read_phenotype' function.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/lemieuxl/genipe_pyvenv/lib64/python3.6/site-packages/genipe/tests/test_imputed_stats.py", line 248, in test_read_phenotype
filename, args,
File "/home/lemieuxl/genipe_pyvenv/lib64/python3.6/site-packages/genipe/tools/imputed_stats.py", line 251, in read_phenotype
(sex_counts.index == 2))].sum()
ValueError: Unknown format code 'd' for object of type 'float'
----------------------------------------------------------------------
Ran 1 test in 0.008s
FAILED (errors=1) If you downgrade to pandas version 0.20, the test should pass. pip uninstall pandas
pip install pandas==0.20 $ pip list
Package Version
--------------- -------
genipe 1.3.3
Jinja2 2.10
MarkupSafe 1.0
numpy 1.13.3
pandas 0.20.0
pip 9.0.1
pyfaidx 0.5.1
python-dateutil 2.6.1
pytz 2017.3
setuptools 36.6.0
six 1.11.0
$ python -m unittest genipe.tests.test_imputed_stats.TestImputedStats.test_read_phenotype
.
----------------------------------------------------------------------
Ran 1 test in 0.114s
OK I will fix this in a future release, but, for now, I suggest downgrading to pandas version 0.20. |
Thanks for your immediate answer. I first had to install the RPM packages |
Yes, to downgrade pandas, you need to compile from the source code. |
After I installed genipe (on a fully updated Fedora 25 system) as described in the documentation I executed the test and get an error message.
In detail I did the following as root:
dnf install python3 python3-devel python3-numpy python3-jinja2 python3-pandas python3-setuptools
And then I did the following as a user:
pyvenv $HOME/genipe_pyvenv
source $HOME/genipe_pyvenv/bin/activate
pip install genipe
pip install pyfaidx
python
import genipe
genipe.test()
After that I get the following error message:
I get one more error message which is described in another ticket.
It seems to me that the character 'd' in line 247 of the file genipe/tools/imputed_stats.py has to be replaced by the character 'f'.
The output of the command
source $HOME/genipe_pyvenv/bin/activate; python --version; deactivate
is: Python 3.5.4The text was updated successfully, but these errors were encountered: