You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@airavata.apache.org by "Marcus Christie (Jira)" <ji...@apache.org> on 2021/03/18 21:53:00 UTC

[jira] [Updated] (AIRAVATA-3415) Don't require application interface to exist to load experiment summary/statistics views

     [ https://issues.apache.org/jira/browse/AIRAVATA-3415?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marcus Christie updated AIRAVATA-3415:
--------------------------------------
    Description: 
This error
{code}
local variable 'applicationModule' referenced before assignment

{code}

in views.py: FullExperimentViewSet.get_instance:
{code}
        full_experiment = serializers.FullExperiment(
            experimentModel,
            project=project,
            outputDataProducts=outputDataProducts,
            inputDataProducts=inputDataProducts,
            applicationModule=applicationModule,
            computeResource=compute_resource,
            jobDetails=job_details,
            outputViews=exp_output_views)
{code}

And the problem appears to come from:
{code}
        try:
            if applicationInterface is not None:
                appModuleId = applicationInterface.applicationModules[0]
                applicationModule = self.request.airavata_client \
                    .getApplicationModule(self.authz_token, appModuleId)
            else:
                log.warning(
                    "Cannot log application model since app interface failed to load")
        except Exception:
            log.exception("Failed to load app interface/module")
            applicationModule = None
{code}

The applicationModule is never initialized to None in the else block above.


  was:
This error
```
local variable 'applicationModule' referenced before assignment

```

in views.py: FullExperimentViewSet.get_instance:
```
        full_experiment = serializers.FullExperiment(
            experimentModel,
            project=project,
            outputDataProducts=outputDataProducts,
            inputDataProducts=inputDataProducts,
            applicationModule=applicationModule,
            computeResource=compute_resource,
            jobDetails=job_details,
            outputViews=exp_output_views)
```

And the problem appears to come from:
```
        try:
            if applicationInterface is not None:
                appModuleId = applicationInterface.applicationModules[0]
                applicationModule = self.request.airavata_client \
                    .getApplicationModule(self.authz_token, appModuleId)
            else:
                log.warning(
                    "Cannot log application model since app interface failed to load")
        except Exception:
            log.exception("Failed to load app interface/module")
            applicationModule = None
```

The applicationModule is never initialized to None in the else block above.


> Don't require application interface to exist to load experiment summary/statistics views
> ----------------------------------------------------------------------------------------
>
>                 Key: AIRAVATA-3415
>                 URL: https://issues.apache.org/jira/browse/AIRAVATA-3415
>             Project: Airavata
>          Issue Type: Bug
>          Components: Django Portal
>            Reporter: Marcus Christie
>            Assignee: Marcus Christie
>            Priority: Major
>
> This error
> {code}
> local variable 'applicationModule' referenced before assignment
> {code}
> in views.py: FullExperimentViewSet.get_instance:
> {code}
>         full_experiment = serializers.FullExperiment(
>             experimentModel,
>             project=project,
>             outputDataProducts=outputDataProducts,
>             inputDataProducts=inputDataProducts,
>             applicationModule=applicationModule,
>             computeResource=compute_resource,
>             jobDetails=job_details,
>             outputViews=exp_output_views)
> {code}
> And the problem appears to come from:
> {code}
>         try:
>             if applicationInterface is not None:
>                 appModuleId = applicationInterface.applicationModules[0]
>                 applicationModule = self.request.airavata_client \
>                     .getApplicationModule(self.authz_token, appModuleId)
>             else:
>                 log.warning(
>                     "Cannot log application model since app interface failed to load")
>         except Exception:
>             log.exception("Failed to load app interface/module")
>             applicationModule = None
> {code}
> The applicationModule is never initialized to None in the else block above.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)