SunPengChuan / wgdi

WGDI: A user-friendly toolkit for evolutionary analyses of whole-genome duplications and ancestral karyotypes
https://wgdi.readthedocs.io/en/latest/
BSD 2-Clause "Simplified" License
121 stars 22 forks source link

sep="\n" cause ValueError? #16

Closed JiyangChang closed 2 years ago

JiyangChang commented 2 years ago

Hi Pengchuan,

Thanks for your great work!

I had trouble when running WGDI. Pandas raise ValueError as follows:

--skip--
File "/home/testchamber/anaconda3/envs/wgdi/lib/python3.10/site-packages/wgdi/ks.py", line 33, in auto_file
    p = pd.read_csv(self.pairs_file, sep='\n', header=None, nrows=30)
--skip--
File "/home/testchamber/anaconda3/envs/wgdi/lib/python3.10/site-packages/pandas/io/parsers/readers.py", line 1533, in _refine_defaults_read
    raise ValueError(
ValueError: Specified \n as separator or delimiter. This forces the python engine which does not accept a line terminator. Hence it is not allowed to use the line terminator as separator.

Could you kindly give me some suggestions?

SunPengChuan commented 2 years ago

Can you upload the pairs_file file?

SunPengChuan commented 2 years ago

Someone has a similar problem, his python version is 3.10. Is the same for your python version?

JiyangChang commented 2 years ago

Someone has a similar problem, his python version is 3.10. Is the same for your python version?

Yes, that's true, we have the same problem. I also replied in the issue he opened, thanks!

JiyangChang commented 2 years ago

Add reference issue #17

longrc commented 2 years ago

Someone has a similar problem, his python version is 3.10. Is the same for your python version?

I also had the same problem after installing new version of wgdi recently. I find this problem is caused by new version of Pandas (>=1.4.0), not by Python. If you install wgdi by conda, new version of Pandas=1.4.1 will installed automatically. Downgrade Pandas to 1.3.5 will solve this problem.