Cannot read input file with Chinese text in filename
Closed this issue · 2 comments
meisproject commented
Hi,
When I use pyfastx.Fasta to read a file with Chinese text in its path, it throw out a file exists error. And I'm sure the file exists.
My code is like this:
import os
import pyfastx
input_fasta = r'C:\Users\smei\Documents\新建文件夹\gene_cds_hg38.fa'
if os.path.exists(input_fasta):
print(f"{input_fasta} exists.")
else:
print(f"{input_fasta} not exists.")
all_seq = pyfastx.Fasta(input_fasta)
And the following is the output and trackback:
C:\Users\smei\Documents\新建文件夹\gene_cds_hg38.fa exists.
Traceback (most recent call last):
File "C:\Users\smei\Downloads\test.py", line 9, in
all_seq = pyfastx.Fasta(input_fasta)
FileExistsError: the input fasta file C:\Users\smei\Documents\新建文件夹\gene_cds_hg38.fa does not exists
Thanks!
lmdu commented
Thank you for reporting this issue. I will fixed it in next version.
lmdu commented
Added support for chinese in version 2.0.0.