zwdzwd / transvar

TransVar - multiway annotator for precision medicine
Other
115 stars 34 forks source link

UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 0: invalid start byte #20

Open kantale opened 6 years ago

kantale commented 6 years ago

Hello,

I came up with the following Exception:

input   transcript  gene    strand  coordinates(gDNA/cDNA/protein)  region  info
Traceback (most recent call last):
  File "/home/ubuntu/anaconda3/bin/transvar", line 36, in <module>
    args.func(args)
  File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/transvar/anno.py", line 211, in main
    main_one(args, db, at)
  File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/transvar/anno.py", line 186, in main_one
    for q.gene in db.get_gene(q.tok):
  File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/transvar/annodb.py", line 213, in get_gene
    for g in db.get(name):
  File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/transvar/localdb.py", line 174, in get
    for g in self.get_by_alias(_name):
  File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/transvar/localdb.py", line 224, in get_by_alias
    self.alias_idx = load(open(self.dbfn+'.alias_idx'))
  File "/home/ubuntu/anaconda3/lib/python3.6/codecs.py", line 321, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 0: invalid start byte

The command that I run was:

transvar canno -i 'NG_008377.1:c.-1289G>A' --refseq

Transvar version:

from transvar import version
print (version.__version__)

>>> '2.3.4.20161215' 

Installation commands:

pip install transvar

Python version:

import sys
print(sys.version)

>>> '3.6.3 |Anaconda, Inc.| (default, Oct 13 2017, 12:02:49) \n[GCC 7.2.0]'

Thanks.

zwdzwd commented 6 years ago

Thanks for reporting. Looks like this is a bug in https://stackoverflow.com/questions/32957708/python-pickle-error-unicodedecodeerror

I have uploaded a fix and will be included in the next release.

Btw, the NG_ accession is not currently supported though. I will work on an update.