Cristian S. Rocha wrote at 2004-4-22 17:33 -0300:
I'm trying to use BioPython in an External Method but it return "ImportError: cannot import name FastaReader" (and others functions). I check some "tricks" but nothing change.
Then I modify my external method to know what happening with the symbol table:
The program:
""" def SequenceRead(SequenceString): import StringIO import Bio.SeqIO.FASTA
return vars(Bio.SeqIO.FASTA).keys()
"""
When I run it at command line the function return:
""" ['Bio', 'string', 'Seq', 'FastaReader', '__builtins__', '__file__', 'SeqRecord', 'FastaWriter', '__name__', 'os', '__doc__'] """
That's ok. But When I run it in Zope the function return:
""" ['Bio', 'string', 'Seq', '__builtins__', '__name__', '__file__', 'os', '__doc__'] """
The function lost the "FastaReader", "SeqRecord" and "FastaWriter" in the symbol table!!!
Check your log file whether you see any exceptions there. If not, check your code whether it contains "except ImportError:" clauses. -- Dieter