Hi all,
I'm having trouble with the Galaxy functional tests. On our Linux server things seem to work, but I'm having trouble on my Mac. This affects multiple tests.
For example, using a test for my own tool wrapper, on Linux my test passes. On my Mac, the tool is missing the required binary so I expect the test to fail with error level 127 and a message to stderr.
However, I get the following cryptic error:
$ ./run_functional_tests.sh -id tmhmm2 ... functional_tests.py INFO 2010-10-28 11:57:01,129 Embedded web server started functional_tests.py INFO 2010-10-28 11:57:01,185 Functional tests will be run against localhost:8980 nose.plugins.manager DEBUG 2010-10-28 11:57:01,210 DefaultPluginManager load plugin sqlalchemy = sqlalchemy.test.noseplugin:NoseSQLAlchemy nose.plugins.manager DEBUG 2010-10-28 11:57:01,215 DefaultPluginManager load plugin nosehtml = nosehtml.plugin:NoseHTML TMHMM 2.0 ( tmhmm2 ) > Test-1 ... Error - <type 'exceptions.TypeError'>: 'NoneType' object is not callable URL: http://localhost:8980/history File '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Paste-1.7.2-py2.5.egg/paste/exceptions/errormiddleware.py', line 144 in __call__ app_iter = self.application(environ, sr_checker) File '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Paste-1.7.2-py2.5.egg/paste/recursive.py', line 80 in __call__ return self.application(environ, start_response) File '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Paste-1.7.2-py2.5.egg/paste/httpexceptions.py', line 636 in __call__ return self.application(environ, start_response) File '/Users/xxx/repositories/galaxy-central/lib/galaxy/web/framework/base.py', line 154 in __call__ return body( environ, start_response ) File '/Users/xxx/repositories/galaxy-central/lib/galaxy/web/framework/__init__.py', line 668 in render template.render_context( context ) File '/Users/xxx/repositories/galaxy-central/eggs/Mako-0.2.5-py2.5.egg/mako/template.py', line 146 in render_context runtime._render_context(self, self.callable_, context, *args, **kwargs) File '/Users/xxx/repositories/galaxy-central/eggs/Mako-0.2.5-py2.5.egg/mako/runtime.py', line 381 in _render_context _exec_template(inherit, lclcontext, args=args, kwargs=kwargs) File '/Users/xxx/repositories/galaxy-central/eggs/Mako-0.2.5-py2.5.egg/mako/runtime.py', line 414 in _exec_template callable_(context, *args, **kwargs) File '/Users/xxx/repositories/galaxy-central/database/compiled_templates/root/history.mako.py', line 55 in render_body __M_writer(u'\n<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">\n\n<html>\n\n<head>\n<title>') File '/Users/xxx/repositories/galaxy-central/lib/galaxy/web/framework/__init__.py', line 665 in write response_write( d.encode( 'utf-8' ) ) TypeError: 'NoneType' object is not callable
CGI Variables ------------- CONTENT_LENGTH: '0' HTTP_ACCEPT: 'text/html; */*' HTTP_ACCEPT_ENCODING: 'identity' HTTP_CONNECTION: 'close' HTTP_COOKIE: '$Version=1; galaxysession=eb142648ac45b770a711a07bbd8189c4a80d9868f9ceff96f0635391728a47dfe5161bca180a2aae; $Path="/"' HTTP_HOST: 'localhost:8980' PATH_INFO: '/history' REMOTE_ADDR: '127.0.0.1' REQUEST_METHOD: 'GET' SERVER_NAME: '127.0.0.1' SERVER_PORT: '8980' SERVER_PROTOCOL: 'HTTP/1.1'
Configuration ------------- static_enabled: False use_translogger: False
WSGI Variables -------------- application: <paste.recursive.RecursiveMiddleware object at 0xbfd2e10> paste.cookies: (SimpleCookie: galaxysession='eb142648ac45b770a711a07bbd8189c4a80d9868f9ceff96f0635391728a47dfe5161bca180a2aae', '$Version=1; galaxysession=eb142648ac45b770a711a07bbd8189c4a80d9868f9ceff96f0635391728a47dfe5161bca180a2aae; $Path="/"') paste.expected_exceptions: [<class 'paste.httpexceptions.HTTPException'>] paste.httpexceptions: <paste.httpexceptions.HTTPExceptionHandler object at 0xbfd3110> paste.httpserver.thread_pool: <paste.httpserver.ThreadPool object at 0xccf1f10> paste.recursive.forward: <paste.recursive.Forwarder from /> paste.recursive.include: <paste.recursive.Includer from /> paste.recursive.include_app_iter: <paste.recursive.IncluderAppIter from /> paste.recursive.script_name: '' paste.throw_errors: True webob._parsed_query_vars: (MultiDict([]), '') wsgi process: 'Multithreaded' ------------------------------------------------------------ ERROR
====================================================================== ERROR: TMHMM 2.0 ( tmhmm2 ) > Test-1 ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/xxx/repositories/galaxy-central/test/functional/test_toolbox.py", line 160, in test_tool self.do_it( td ) File "/Users/xxx/repositories/galaxy-central/test/functional/test_toolbox.py", line 24, in do_it self.new_history() File "/Users/xxx/repositories/galaxy-central/test/base/twilltestcase.py", line 291, in new_history self.check_history_for_string('Your history is empty') File "/Users/xxx/repositories/galaxy-central/test/base/twilltestcase.py", line 215, in check_history_for_string self.visit_page( "history" ) File "/Users/xxx/repositories/galaxy-central/test/base/twilltestcase.py", line 1040, in visit_page tc.code( 200 ) File "/Users/xxx/repositories/galaxy-central/eggs/twill-0.9-py2.5.egg/twill/commands.py", line 133, in code should_be)) TwillAssertionError: code is 500 != 200
---------------------------------------------------------------------- Ran 1 test in 0.824s
FAILED (errors=1) functional_tests.py INFO 2010-10-28 11:57:02,079 Shutting down functional_tests.py INFO 2010-10-28 11:57:02,079 Shutting down embedded web server ...
###############################################################################
Here is my suggested fix:
diff -r 82743fcbf23c lib/galaxy/web/framework/__init__.py --- a/lib/galaxy/web/framework/__init__.py Thu Oct 28 11:41:18 2010 +0100 +++ b/lib/galaxy/web/framework/__init__.py Thu Oct 28 11:56:16 2010 +0100 @@ -660,6 +660,9 @@ ## return template.render( **data ) def render( environ, start_response ): response_write = start_response( self.response.wsgi_status(), self.response.wsgi_headeritems() ) + if response_write is None: + log.error( "Error: this request returned None from start_response: %s" % self.request.browser_url ) + return [] class StreamBuffer( object ): def write( self, d ): response_write( d.encode( 'utf-8' ) )
###############################################################################
With the patch, I get:
$ ./run_functional_tests.sh -id tmhmm2 ... functional_tests.py INFO 2010-10-28 11:52:37,742 Embedded web server started functional_tests.py INFO 2010-10-28 11:52:37,800 Functional tests will be run against localhost:9383 nose.plugins.manager DEBUG 2010-10-28 11:52:37,825 DefaultPluginManager load plugin sqlalchemy = sqlalchemy.test.noseplugin:NoseSQLAlchemy nose.plugins.manager DEBUG 2010-10-28 11:52:37,829 DefaultPluginManager load plugin nosehtml = nosehtml.plugin:NoseHTML TMHMM 2.0 ( tmhmm2 ) > Test-1 ... galaxy.web.framework ERROR 2010-10-28 11:52:38,685 Error: this request returned None from start_response: http://localhost:9383/history ERROR
====================================================================== ERROR: TMHMM 2.0 ( tmhmm2 ) > Test-1 ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/xxx/repositories/galaxy-central/test/functional/test_toolbox.py", line 160, in test_tool self.do_it( td ) File "/Users/xxx/repositories/galaxy-central/test/functional/test_toolbox.py", line 24, in do_it self.new_history() File "/Users/xxx/repositories/galaxy-central/test/base/twilltestcase.py", line 291, in new_history self.check_history_for_string('Your history is empty') File "/Users/xxx/repositories/galaxy-central/test/base/twilltestcase.py", line 217, in check_history_for_string tc.find(subpatt) File "/Users/xxx/repositories/galaxy-central/eggs/twill-0.9-py2.5.egg/twill/commands.py", line 239, in find raise TwillAssertionError("no match to '%s'" % (what,)) TwillAssertionError: no match to 'Your' -------------------- >> begin captured logging << -------------------- galaxy.web.framework: ERROR: Error: this request returned None from start_response: http://localhost:9383/history --------------------- >> end captured logging << ---------------------
---------------------------------------------------------------------- Ran 1 test in 0.821s
FAILED (errors=1) functional_tests.py INFO 2010-10-28 11:52:38,691 Shutting down functional_tests.py INFO 2010-10-28 11:52:38,691 Shutting down embedded web server ...
###############################################################################
I'm still puzzled about what is going wrong - this affects other Galaxy tests as well - not just mine. Is there something obvious wrong with the setup on this machine? Actually using Galaxy running on this Mac seems to work.
Thanks,
Peter
Hi Peter,
Could you set "debug = 'True'," in the kwargs dict in ./scripts/functional_tests.py and see if you get any more useful output?
Thanks, --nate
Peter wrote:
Hi all,
I'm having trouble with the Galaxy functional tests. On our Linux server things seem to work, but I'm having trouble on my Mac. This affects multiple tests.
For example, using a test for my own tool wrapper, on Linux my test passes. On my Mac, the tool is missing the required binary so I expect the test to fail with error level 127 and a message to stderr.
However, I get the following cryptic error:
$ ./run_functional_tests.sh -id tmhmm2 ... functional_tests.py INFO 2010-10-28 11:57:01,129 Embedded web server started functional_tests.py INFO 2010-10-28 11:57:01,185 Functional tests will be run against localhost:8980 nose.plugins.manager DEBUG 2010-10-28 11:57:01,210 DefaultPluginManager load plugin sqlalchemy = sqlalchemy.test.noseplugin:NoseSQLAlchemy nose.plugins.manager DEBUG 2010-10-28 11:57:01,215 DefaultPluginManager load plugin nosehtml = nosehtml.plugin:NoseHTML TMHMM 2.0 ( tmhmm2 ) > Test-1 ... Error - <type 'exceptions.TypeError'>: 'NoneType' object is not callable URL: http://localhost:8980/history File '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Paste-1.7.2-py2.5.egg/paste/exceptions/errormiddleware.py', line 144 in __call__ app_iter = self.application(environ, sr_checker) File '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Paste-1.7.2-py2.5.egg/paste/recursive.py', line 80 in __call__ return self.application(environ, start_response) File '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Paste-1.7.2-py2.5.egg/paste/httpexceptions.py', line 636 in __call__ return self.application(environ, start_response) File '/Users/xxx/repositories/galaxy-central/lib/galaxy/web/framework/base.py', line 154 in __call__ return body( environ, start_response ) File '/Users/xxx/repositories/galaxy-central/lib/galaxy/web/framework/__init__.py', line 668 in render template.render_context( context ) File '/Users/xxx/repositories/galaxy-central/eggs/Mako-0.2.5-py2.5.egg/mako/template.py', line 146 in render_context runtime._render_context(self, self.callable_, context, *args, **kwargs) File '/Users/xxx/repositories/galaxy-central/eggs/Mako-0.2.5-py2.5.egg/mako/runtime.py', line 381 in _render_context _exec_template(inherit, lclcontext, args=args, kwargs=kwargs) File '/Users/xxx/repositories/galaxy-central/eggs/Mako-0.2.5-py2.5.egg/mako/runtime.py', line 414 in _exec_template callable_(context, *args, **kwargs) File '/Users/xxx/repositories/galaxy-central/database/compiled_templates/root/history.mako.py', line 55 in render_body __M_writer(u'\n<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">\n\n<html>\n\n<head>\n<title>') File '/Users/xxx/repositories/galaxy-central/lib/galaxy/web/framework/__init__.py', line 665 in write response_write( d.encode( 'utf-8' ) ) TypeError: 'NoneType' object is not callable
CGI Variables
CONTENT_LENGTH: '0' HTTP_ACCEPT: 'text/html; */*' HTTP_ACCEPT_ENCODING: 'identity' HTTP_CONNECTION: 'close' HTTP_COOKIE: '$Version=1; galaxysession=eb142648ac45b770a711a07bbd8189c4a80d9868f9ceff96f0635391728a47dfe5161bca180a2aae; $Path="/"' HTTP_HOST: 'localhost:8980' PATH_INFO: '/history' REMOTE_ADDR: '127.0.0.1' REQUEST_METHOD: 'GET' SERVER_NAME: '127.0.0.1' SERVER_PORT: '8980' SERVER_PROTOCOL: 'HTTP/1.1'
Configuration
static_enabled: False use_translogger: False
WSGI Variables
application: <paste.recursive.RecursiveMiddleware object at 0xbfd2e10> paste.cookies: (SimpleCookie: galaxysession='eb142648ac45b770a711a07bbd8189c4a80d9868f9ceff96f0635391728a47dfe5161bca180a2aae', '$Version=1; galaxysession=eb142648ac45b770a711a07bbd8189c4a80d9868f9ceff96f0635391728a47dfe5161bca180a2aae; $Path="/"') paste.expected_exceptions: [<class 'paste.httpexceptions.HTTPException'>] paste.httpexceptions: <paste.httpexceptions.HTTPExceptionHandler object at 0xbfd3110> paste.httpserver.thread_pool: <paste.httpserver.ThreadPool object at 0xccf1f10> paste.recursive.forward: <paste.recursive.Forwarder from /> paste.recursive.include: <paste.recursive.Includer from /> paste.recursive.include_app_iter: <paste.recursive.IncluderAppIter from /> paste.recursive.script_name: '' paste.throw_errors: True webob._parsed_query_vars: (MultiDict([]), '') wsgi process: 'Multithreaded'
ERROR
====================================================================== ERROR: TMHMM 2.0 ( tmhmm2 ) > Test-1
Traceback (most recent call last): File "/Users/xxx/repositories/galaxy-central/test/functional/test_toolbox.py", line 160, in test_tool self.do_it( td ) File "/Users/xxx/repositories/galaxy-central/test/functional/test_toolbox.py", line 24, in do_it self.new_history() File "/Users/xxx/repositories/galaxy-central/test/base/twilltestcase.py", line 291, in new_history self.check_history_for_string('Your history is empty') File "/Users/xxx/repositories/galaxy-central/test/base/twilltestcase.py", line 215, in check_history_for_string self.visit_page( "history" ) File "/Users/xxx/repositories/galaxy-central/test/base/twilltestcase.py", line 1040, in visit_page tc.code( 200 ) File "/Users/xxx/repositories/galaxy-central/eggs/twill-0.9-py2.5.egg/twill/commands.py", line 133, in code should_be)) TwillAssertionError: code is 500 != 200
Ran 1 test in 0.824s
FAILED (errors=1) functional_tests.py INFO 2010-10-28 11:57:02,079 Shutting down functional_tests.py INFO 2010-10-28 11:57:02,079 Shutting down embedded web server ...
###############################################################################
Here is my suggested fix:
diff -r 82743fcbf23c lib/galaxy/web/framework/__init__.py --- a/lib/galaxy/web/framework/__init__.py Thu Oct 28 11:41:18 2010 +0100 +++ b/lib/galaxy/web/framework/__init__.py Thu Oct 28 11:56:16 2010 +0100 @@ -660,6 +660,9 @@ ## return template.render( **data ) def render( environ, start_response ): response_write = start_response( self.response.wsgi_status(), self.response.wsgi_headeritems() )
if response_write is None:
log.error( "Error: this request returned None from
start_response: %s" % self.request.browser_url )
return [] class StreamBuffer( object ): def write( self, d ): response_write( d.encode( 'utf-8' ) )
###############################################################################
With the patch, I get:
$ ./run_functional_tests.sh -id tmhmm2 ... functional_tests.py INFO 2010-10-28 11:52:37,742 Embedded web server started functional_tests.py INFO 2010-10-28 11:52:37,800 Functional tests will be run against localhost:9383 nose.plugins.manager DEBUG 2010-10-28 11:52:37,825 DefaultPluginManager load plugin sqlalchemy = sqlalchemy.test.noseplugin:NoseSQLAlchemy nose.plugins.manager DEBUG 2010-10-28 11:52:37,829 DefaultPluginManager load plugin nosehtml = nosehtml.plugin:NoseHTML TMHMM 2.0 ( tmhmm2 ) > Test-1 ... galaxy.web.framework ERROR 2010-10-28 11:52:38,685 Error: this request returned None from start_response: http://localhost:9383/history ERROR
====================================================================== ERROR: TMHMM 2.0 ( tmhmm2 ) > Test-1
Traceback (most recent call last): File "/Users/xxx/repositories/galaxy-central/test/functional/test_toolbox.py", line 160, in test_tool self.do_it( td ) File "/Users/xxx/repositories/galaxy-central/test/functional/test_toolbox.py", line 24, in do_it self.new_history() File "/Users/xxx/repositories/galaxy-central/test/base/twilltestcase.py", line 291, in new_history self.check_history_for_string('Your history is empty') File "/Users/xxx/repositories/galaxy-central/test/base/twilltestcase.py", line 217, in check_history_for_string tc.find(subpatt) File "/Users/xxx/repositories/galaxy-central/eggs/twill-0.9-py2.5.egg/twill/commands.py", line 239, in find raise TwillAssertionError("no match to '%s'" % (what,)) TwillAssertionError: no match to 'Your' -------------------- >> begin captured logging << -------------------- galaxy.web.framework: ERROR: Error: this request returned None from start_response: http://localhost:9383/history --------------------- >> end captured logging << ---------------------
Ran 1 test in 0.821s
FAILED (errors=1) functional_tests.py INFO 2010-10-28 11:52:38,691 Shutting down functional_tests.py INFO 2010-10-28 11:52:38,691 Shutting down embedded web server ...
###############################################################################
I'm still puzzled about what is going wrong - this affects other Galaxy tests as well - not just mine. Is there something obvious wrong with the setup on this machine? Actually using Galaxy running on this Mac seems to work.
Thanks,
Peter _______________________________________________ galaxy-dev mailing list galaxy-dev@lists.bx.psu.edu http://lists.bx.psu.edu/listinfo/galaxy-dev
On Tue, Nov 2, 2010 at 1:45 PM, Nate Coraor nate@bx.psu.edu wrote:
Hi Peter,
Could you set "debug = 'True'," in the kwargs dict in ./scripts/functional_tests.py and see if you get any more useful output?
Thanks, --nate
Hi Nate,
Thanks for the suggestions - I tried that,
diff -r 82743fcbf23c scripts/functional_tests.py --- a/scripts/functional_tests.py Thu Oct 28 11:41:18 2010 +0100 +++ b/scripts/functional_tests.py Wed Nov 03 11:10:42 2010 +0000 @@ -92,7 +92,7 @@ outputs_to_working_directory = 'True', set_metadata_externally = 'True', static_enabled = 'False', - debug = 'False', + debug = 'True', track_jobs_in_database = 'True', job_scheduler_policy = 'FIFO', start_job_runners = 'pbs',
However the output appears unchanged with respect to the failing test.
Are there any history/cookie/cache related files I can manually delete which may be causing this problem?
Regards,
Peter
Hi all,
I've since restarted with a clean clone of the repository, and see the same problems. See:
http://lists.bx.psu.edu/pipermail/galaxy-dev/2010-October/003625.html http://lists.bx.psu.edu/pipermail/galaxy-dev/2010-November/003645.html http://lists.bx.psu.edu/pipermail/galaxy-dev/2010-November/003665.html
Maybe I should be asking a different question: Has anyone ever used run_functional_tests.sh successfully on Mac OS X 10.6 Snow Leopard?
Thanks,
Peter
Revival! (This thread was sitting "flagged" in my mailbox since November)
Peter wrote:
Hi all,
I've since restarted with a clean clone of the repository, and see the same problems. See:
http://lists.bx.psu.edu/pipermail/galaxy-dev/2010-October/003625.html http://lists.bx.psu.edu/pipermail/galaxy-dev/2010-November/003645.html http://lists.bx.psu.edu/pipermail/galaxy-dev/2010-November/003665.html
Maybe I should be asking a different question: Has anyone ever used run_functional_tests.sh successfully on Mac OS X 10.6 Snow Leopard?
I was just creating a Bitbucket for this issue and realized that you've got a locally installed version of Paste (1.7.2) that is overriding the egg provided with Galaxy (1.6). The egg handling code was recently updated to prevent this from happening, could you pull the latest and see if you're still unable to run tests?
Thanks, --nate
Thanks,
Peter
On Mon, Feb 21, 2011 at 2:43 PM, Nate Coraor nate@bx.psu.edu wrote:
Revival! (This thread was sitting "flagged" in my mailbox since November)
I guess I should try and file issues for things which don't get a prompt resolution on the mailing list, but its good to know it hadn't been forgotten.
Hi all,
I've since restarted with a clean clone of the repository, and see the same problems. See:
http://lists.bx.psu.edu/pipermail/galaxy-dev/2010-October/003625.html http://lists.bx.psu.edu/pipermail/galaxy-dev/2010-November/003645.html http://lists.bx.psu.edu/pipermail/galaxy-dev/2010-November/003665.html
Maybe I should be asking a different question: Has anyone ever used run_functional_tests.sh successfully on Mac OS X 10.6 Snow Leopard?
I was just creating a Bitbucket for this issue and realized that you've got a locally installed version of Paste (1.7.2) that is overriding the egg provided with Galaxy (1.6). The egg handling code was recently updated to prevent this from happening, could you pull the latest and see if you're still unable to run tests?
I'm running with a fresh hg clone of galaxy-central on Mac OS X 10.6, large changeset 5096:2c9ce797953d, and I still see the same kind of assertion failures, e.g.
$ ./run_functional_tests.sh -id ncbi_blastp_wrapper ... TwillAssertionError: code is 500 != 200 ...
However, from the stack trace it is still using the locally installed Paste 1.7.2 rather than the local file eggs/Paste-1.6-py2.5.egg which was fetched.
Peter
Peter wrote:
On Mon, Feb 21, 2011 at 2:43 PM, Nate Coraor nate@bx.psu.edu wrote:
Revival! (This thread was sitting "flagged" in my mailbox since November)
I guess I should try and file issues for things which don't get a prompt resolution on the mailing list, but its good to know it hadn't been forgotten.
I usually try to do this if I'm not going to be able to address an issue quickly, but don't always get to it. Feel free to do so yourself.
Hi all,
I've since restarted with a clean clone of the repository, and see the same problems. See:
http://lists.bx.psu.edu/pipermail/galaxy-dev/2010-October/003625.html http://lists.bx.psu.edu/pipermail/galaxy-dev/2010-November/003645.html http://lists.bx.psu.edu/pipermail/galaxy-dev/2010-November/003665.html
Maybe I should be asking a different question: Has anyone ever used run_functional_tests.sh successfully on Mac OS X 10.6 Snow Leopard?
I was just creating a Bitbucket for this issue and realized that you've got a locally installed version of Paste (1.7.2) that is overriding the egg provided with Galaxy (1.6). The egg handling code was recently updated to prevent this from happening, could you pull the latest and see if you're still unable to run tests?
I'm running with a fresh hg clone of galaxy-central on Mac OS X 10.6, large changeset 5096:2c9ce797953d, and I still see the same kind of assertion failures, e.g.
$ ./run_functional_tests.sh -id ncbi_blastp_wrapper ... TwillAssertionError: code is 500 != 200 ...
However, from the stack trace it is still using the locally installed Paste 1.7.2 rather than the local file eggs/Paste-1.6-py2.5.egg which was fetched.
Okay, still a bug here with eggs and functional tests, it would appear. I'll have a look as soon as possible.
--nate
Peter
galaxy-dev@lists.galaxyproject.org