Hello All,
I have just tried to import a workflow file and when I try to view the workflow, I'm getting an error, "global name 'self' is not defined".
NameError: global name 'self' is not defined
respond
view<< try:
__traceback_supplement__ = errormiddleware.Supplement, self, environ
app_iter = self.application(environ, detect_start_response)
try:
return_iter = list(app_iter)
>> app_iter = self.application(environ, detect_start_response)
__call__
view<< try:
status, headers, body = wsgilib.intercept_output(
environ, self.app)
if status is None:
# Some error occurred
>> environ, self.app)
intercept_output
view<< data.append(headers)
return output.write
app_iter = application(environ, replacement_start_response)
if data[0] is None:
return (None, None, app_iter)
>> app_iter = application(environ, replacement_start_response)
__call__
view<< environ['paste.recursive.script_name'] = my_script_name
try:
return self.application(environ, start_response)
except ForwardRequestException, e:
middleware = CheckForRecursionMiddleware(
>> return self.application(environ, start_response)
__call__
view<< []).append(HTTPException)
try:
return self.application(environ, start_response)
except HTTPException, exc:
return exc(environ, start_response)
>> return self.application(environ, start_response)
__call__
view<< kwargs.pop( '_', None )
try:
body = method( trans, **kwargs )
except Exception, e:
body = self.handle_controller_exception( e, trans, **kwargs )
>> body = method( trans, **kwargs )
display_by_id
view<< # Get workflow.
stored_workflow = self.get_stored_workflow( trans, id )
return self.display(trans, stored_workflow)
def display(self, trans, stored_workflow):
>> return self.display(trans, stored_workflow)
display
view<<
# Get data for workflow's steps.
self.get_stored_workflow_steps( trans, stored_workflow )
# Get annotations.
stored_workflow.annotation = self.get_item_annotation_str( trans.sa_session, stored_workflow.user, stored_workflow )
>> self.get_stored_workflow_steps( trans, stored_workflow )
get_stored_workflow_steps
view<< if step.type == 'tool' or step.type is None:
# Restore the tool state for the step
module = module_factory.from_workflow_step( trans, step )
#Check if tool was upgraded
step.upgrade_messages = module.check_and_update_state()
>> module = module_factory.from_workflow_step( trans, step )
from_workflow_step
view<< """
type = step.type
return self.module_types[type].from_workflow_step( trans, step )
module_factory = WorkflowModuleFactory( dict( data_input=InputDataModule, tool=ToolModule ) )
>> return self.module_types[type].from_workflow_step( trans, step )
from_workflow_step
view<< # in addition to tool id, enhance the selection process here
# to retrieve the correct version of the tool.
tool_version = self.__get_tool_version( trans, tool_id )
if tool_version:
tool_version_ids = tool_version.get_version_ids( trans.app )
>> tool_version = self.__get_tool_version( trans, tool_id )