Rosemeis / pcangsd

Framework for analyzing low depth NGS data in heterogeneous populations using PCA.
GNU General Public License v3.0
46 stars 11 forks source link

expected unicode, got str #57

Closed yungsiyebu closed 2 years ago

yungsiyebu commented 2 years ago

python2 ~/pcangsd.py -beagle ~/bam_list.beagle.gz -o ~/bam_list -threads 64

I got the error below, thank for your help

Parsing Beagle file. Traceback (most recent call last): File "/home/pcangsd/pcangsd.py", line 160, in L = reader_cy.readBeagle(args.beagle) TypeError: Argument 'beagle' has incorrect type (expected unicode, got str)

Rosemeis commented 2 years ago

Hi,

This is a problem due to python2. Using python3 should fix the problem.

Best, Jonas

yungsiyebu commented 2 years ago

Dear author, thank for your help.

I tried to run PCAngsd with python3, but I got another Error, "ImportError: dynamic module does not define module export function (PyInit_reader_cy)".

python3 Python 3.9.6 | packaged by conda-forge | (default, Jul 11 2021, 03:39:48)

import reader_cy Traceback (most recent call last): File "", line 1, in ImportError: dynamic module does not define module export function (PyInit_reader_cy)

python2 Python 2.7.15 | packaged by conda-forge | (default, Mar 5 2020, 14:56:06)

import reader_cy

Rosemeis commented 2 years ago

Try to make a clean install, while building using python3.

Best, Jonas

yungsiyebu commented 2 years ago

Dear author, I rebuild the env of python3.9.7 with conda, and pcangsd runs well now, Thank for your help! best regards wang

Rosemeis commented 2 years ago

That is great to hear. Thanks for reaching out!

Best, Jonas