[Biopython-dev] ongoing ( read long ) Zope saga

Cayte katel at worldpath.net
Thu May 2 01:20:10 EDT 2002

  I've been experimenting  to see if I could call the Fasta parser with Zope
using an external module.
Originally, I created a subdirectory under byopython called Zope.  In it I
stored a simple module, ParseFasta, that accepts a  Fasta file and invokes
the Fasta parser.  Next,  I created an extension script, LaunchFasta,  to
hook  Zope to ParseFasta.  Finally, I set up two  DTML modules to accept
user input, run the script and output the results to a web page.

 The DTML modules consistently resulted in an ImportError.  After searching
the web to see if any developers had had a similar problem, I was unable to
find a solution.  To isolate the problem, I created a trivial python module
in biopython.Zope called CalledFromZope.  This simply returned the message
"Called From Zope".  It still caused an import error when I substituted it
for ParseFasta.  On a wild guess, I changed the subdirectory name Zope to
BioZope to prevent naming conflicts with the Zope installation.  It worked!

 Then  I removed the substitution so LaunchFasta would call ParseFasta, as
it did previously.  This time LaunchFasta returned a message:

Error Type: ValueError
Error Value: signal only works in main thread

 The python trace apparently called ParseFasta but failed in the biopython
registry.  We have some compatibility issues to resolve before we can zopify
our modules.

Traceback (innermost last):
  File C:\Program Files\WebSite\lib\python\ZPublisher\Publish.py, line 150,
in publish_module
  File C:\Program Files\WebSite\lib\python\ZPublisher\Publish.py, line 114,
in publish
  File C:\Program Files\WebSite\lib\python\Zope\__init__.py, line 158, in
    (Object: biopython)
  File C:\Program Files\WebSite\lib\python\ZPublisher\Publish.py, line 98,
in publish
  File C:\Program Files\WebSite\lib\python\ZPublisher\mapply.py, line 88, in
    (Object: show_fasta)
  File C:\Program Files\WebSite\lib\python\ZPublisher\Publish.py, line 39,
in call_object
    (Object: show_fasta)
  File C:\Program Files\WebSite\lib\python\OFS\DTMLMethod.py, line 127, in
    (Object: show_fasta)
  File C:\Program Files\WebSite\lib\python\DocumentTemplate\DT_String.py,
line 473, in __call__
    (Object: show_fasta)
  File C:\Program Files\WebSite\lib\python\DocumentTemplate\DT_Util.py, line
159, in eval
    (Object: Control_Panel.Products.ExternalMethod.launch_fasta( datafile))
    (Info: Control_Panel)
  File <string>, line 2, in f
  File C:\Program
Files\WebSite\lib\python\Products\ExternalMethod\ExternalMethod.py, line
193, in __call__
    (Object: launch_fasta)
  File C:\Program
Files\WebSite\lib\python\Products\ExternalMethod\ExternalMethod.py, line
137, in getFunction
    (Object: launch_fasta)
  File C:\Program Files\WebSite\lib\python\App\Extensions.py, line 145, in
    (Info: ('C:\\Program Files\\WebSite\\Extensions\\LaunchFasta.py',
  File C:\Program Files\WebSite\Extensions\LaunchFasta.py, line 9, in ?
  File C:\BIOPYT~1.00A\BioZope\ParseFasta.py, line 8, in ?
  File C:\BIOPYT~1.00A\Bio\__init__.py, line 50, in ?
    (Object: Bio.FormatRegistry)
  File C:\BIOPYT~1.00A\Bio\DBRegistry.py, line 10, in ?
  File C:\BIOPYT~1.00A\Bio\Tools\MultiProc\__init__.py, line 13, in ?
  File C:\BIOPYT~1.00A\Bio\Tools\MultiProc\Task.py, line 9, in ?
  File C:\BIOPYT~1.00A\Bio\Tools\MultiProc\copen.py, line 359, in ?
    (Object: _PickleHandle)
ValueError: (see above)


More information about the Biopython-dev mailing list