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".

Error Traceback:

View as:   Interactive (full)  |  Text (full)  |  XML (full)
NameError: global name 'self' is not defined
URL: http://127.0.0.1:8080/workflow/display_by_id?id=f2db41e1fa331b3e
Module weberror.evalexception.middleware:364 in 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)
Module paste.debug.prints:98 in __call__         view
<<          try:
                status, headers, body = wsgilib.intercept_output(
                    environ, self.app)
                if status is None:
                    # Some error occurred
>>  environ, self.app)
Module paste.wsgilib:539 in 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)
Module paste.recursive:80 in __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)
Module paste.httpexceptions:632 in __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)
Module galaxy.web.framework.base:160 in __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 )
Module galaxy.web.controllers.workflow:207 in 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)
Module galaxy.web.controllers.workflow:217 in 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 )
Module galaxy.web.base.controller:418 in 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 )
Module galaxy.workflow.modules:369 in 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 )
Module galaxy.workflow.modules:202 in 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 )
NameError: global name 'self' is not defined

Thankyou in advance for any help that you can give.

-Rob