[Biopython] SeqIO.parse exception on Google App Engine
Brad Chapman
chapmanb at 50mail.com
Thu Apr 8 21:19:45 EDT 2010
Hi Reece;
> I'm trying to fetch a Genbank record and parse it in the Google App Engine
> environment. A command line version works fine, but when using exactly the
> same code under Google App Engine, SeqIO throws throws the following
> exception:
> ...
> File "/local/home/reece/tmp/demo1/Bio/GenBank/Scanner.py", line
> 746, in parse_footer
> self.line = self.line.rstrip(os.linesep)
> AttributeError: 'module' object has no attribute 'linesep'
The python on Google App Engine is a bit crippled and lacks some of
the functionality of a full python install. It looks like one issue
must be that os.linesep is not defined on GAE. A quick fix is to
modify this to "\n", or just do:
os.linesep = "\n"
at the top of the Scanner.py file.
It would be really useful if you were able to submit a patch or list
of areas where Biopython fails on app engine and we can think about
how to suitably modify the code base to work on GAE and still be
compatible with Windows.
I did a bit of work on this using Biopython in Google App Engine
last year; code is on GitHub here:
http://github.com/chapmanb/biosqlweb
that might be helpful as a starting place for other ideas.
Good luck and let us know how your GAE experience goes,
Brad
More information about the Biopython
mailing list