-
Notifications
You must be signed in to change notification settings - Fork 15
Import error #1
Copy link
Copy link
Open
Description
The usage of your very cool package seems to raise a lot of errors under current python versions. Due to implicit relative imports being deprecated a lot of your imports cannot find the files in the same directory. To fix this please use explicit relative imports. An example:
Executing the example from your website using Kmer:
from repDNA import util, nac, nacutil
seqs = util.get_data(open("/.../my_sequence.fa"))
kmer = nac.Kmer(k=2)
print(kmer.make_kmer_vec(seqs[0]))raises:
ModuleNotFoundError: No module named 'nacutil'Thus, please replace any imports like
from nacutil import make_upto_kmer_list, make_revcomp_kmer_list, make_kmer_vectorwith relative imports like this:
from .nacutil import make_upto_kmer_list, make_revcomp_kmer_list, make_kmer_vectorplacing a point before every imported python file within the same package.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels