If you notice in your error message you are setting null for project project id 
and user id:

Struct:ExperimentModel(experimentId:DO_NOT_SET_AT_CLIENTS, projectId:null, 
gatewayId:shubhamtestbed, 
experimentType:SINGLE_APPLICATION, userName:null, experimentName:Test create 
and launch exp, 
executionId:Gaussian_a39c4bad-2109-4262-899d-07ef52c54dc4, 

Can you check what user name is null? You may want to focus on the function 
fetch_projectid first and get it to working. That might uncover any issues.

Suresh

> On Dec 14, 2017, at 9:18 PM, Shubham Kumar <shuku...@umail.iu.edu> wrote:
> 
> I am not calling fetch_projectid function, I commented, but still same error.
> 
> On Thu, Dec 14, 2017 at 7:07 PM, Suresh Marru <sma...@apache.org 
> <mailto:sma...@apache.org>> wrote:
> Hi Shubham,
> 
> May be your program returned a null project id but still proceeded. So within 
> your fetch_projectid function when no projects are found, instead of just 
> printing and proceeding further, change that to sys.exit(“project not 
> found”). That way you can catch the error at the source. 
> 
> Suresh
> 
>> On Dec 14, 2017, at 6:03 PM, Shubham Kumar <shuku...@umail.iu.edu 
>> <mailto:shuku...@umail.iu.edu>> wrote:
>> 
>> Hi Dev,
>> 
>> Following is the updated code for create and launch experimnet that I am 
>> working on -
>> 
>> https://gist.github.com/shubhamkr1/c89725d7853a28aaf41fca6cb831e052 
>> <https://gist.github.com/shubhamkr1/c89725d7853a28aaf41fca6cb831e052>
>> 
>> But not sure why it gives error - projectid not set. I have explictly 
>> provided projectid while create experiment object.
>> 
>> Full error -
>> [shubham@149-161-216-64 samples]$ python createAndLaunch.py 
>> /home/shubham/Documents/airavata/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/samples/input1.com
>>  <http://input1.com/>
>> No handlers could be found for logger "thrift.transport.sslcompat"
>> testProjNamecli_76b757fa-8d95-4910-944b-ac1f0f705407
>> experimentmodel :  testProjNamecli_76b757fa-8d95-4910-944b-ac1f0f705407
>> Traceback (most recent call last):
>>   File "createAndLaunch.py", line 140, in <module>
>>     
>> create_and_launch_experiment(airavataClient,authz_token,gatewayID,appID,computeResourceName,username,projectid,experimentName,args.filepath)
>>   File "createAndLaunch.py", line 107, in create_and_launch_experiment
>>     experimentId = 
>> airavataClient.createExperiment(authz_token,gatewayID,experimentModel)
>>   File "../lib/apache/airavata/api/Airavata.py", line 5294, in 
>> createExperiment
>>     return self.recv_createExperiment()
>>   File "../lib/apache/airavata/api/Airavata.py", line 5313, in 
>> recv_createExperiment
>>     raise x
>> thrift.Thrift.TApplicationException: Required field 'projectId' is unset! 
>> 
>> Struct:ExperimentModel(experimentId:DO_NOT_SET_AT_CLIENTS, projectId:null, 
>> gatewayId:shubhamtestbed, 
>> experimentType:SINGLE_APPLICATION, userName:null, experimentName:Test create 
>> and launch exp, 
>> executionId:Gaussian_a39c4bad-2109-4262-899d-07ef52c54dc4, 
>> experimentInputs:[InputDataObjectType(name:Input-File, 
>> value:/home/shubham/Documents/airavata/airavata-api/airavata-client-sdks/airavata-python-sdk/
>> src/main/resources/samples/input1.com <http://input1.com/>, type:URI, 
>> applicationArgument:, standardInput:false, userFriendlyDescription:Gaussian 
>> input file specifying 
>> desired calculation type, model chemistry, molecular system and other 
>> parameters., metaData:, inputOrder:1, isRequired:true, 
>> requiredToAddedToCommandLine:true,
>>  dataStaged:false, isReadOnly:false)], 
>> experimentOutputs:[OutputDataObjectType(name:Gaussian-Application-Output, 
>> value:Gaussian.log, type:URI, 
>>  applicationArgument:, isRequired:true, requiredToAddedToCommandLine:true, 
>> dataMovement:true, location:, searchQuery:, outputStreaming:false), 
>>  OutputDataObjectType(name:Gaussian-Job-Standard-Error, value:, type:STDERR, 
>> applicationArgument:, isRequired:true, requiredToAddedToCommandLine:false, 
>>  dataMovement:false, location:, searchQuery:, outputStreaming:false), 
>> OutputDataObjectType(name:Gaussian-Job-Standard-Output, value:, type:STDOUT, 
>>  applicationArgument:, isRequired:true, requiredToAddedToCommandLine:false, 
>> dataMovement:false, location:, searchQuery:, outputStreaming:false)])
>> 
>> Best,
>> Shubham
>> 
>> 
>> On Thu, Dec 14, 2017 at 10:15 AM, Suresh Marru <sma...@apache.org 
>> <mailto:sma...@apache.org>> wrote:
>> Hi Subham,
>> 
>> Yes thats correct, you should be using the InputDataObjectType to set all 
>> inputs. 
>> 
>> Suresh
>> 
>> 
>>> On Dec 13, 2017, at 11:13 PM, Shubham Kumar <shuku...@umail.iu.edu 
>>> <mailto:shuku...@umail.iu.edu>> wrote:
>>> 
>>> I have checked the mentioned PHP code. This code uses DataProductModel and 
>>> DataReplicaLocationModel to handle tar Input files for experiment. THere is 
>>> no description these models.
>>> I thought  InputDataObjectType would be used to handle input files. Is this 
>>> correct ?
>>> 
>>> Best,
>>> Shubham
>>> 
>>> On Fri, Dec 8, 2017 at 3:01 PM, Suresh Marru <sma...@apache.org 
>>> <mailto:sma...@apache.org>> wrote:
>>> Hi Subham,
>>> 
>>> The two steps are Create and then Launch. In your sample you can have a 
>>> single client to do both. You can look at these PHP examples as a reference:
>>> 
>>> https://github.com/SciGaP/ultrascan-airavata-bridge/blob/master/AiravataWrapper.php
>>>  
>>> <https://github.com/SciGaP/ultrascan-airavata-bridge/blob/master/AiravataWrapper.php>
>>>  and 
>>> https://github.com/SciGaP/ultrascan-airavata-bridge/blob/master/AiravataUtils.php
>>>  
>>> <https://github.com/SciGaP/ultrascan-airavata-bridge/blob/master/AiravataUtils.php>
>>> 
>>> Suresh
>>> 
>>> 
>>>> On Dec 8, 2017, at 2:58 PM, Shubham Kumar <shuku...@umail.iu.edu 
>>>> <mailto:shuku...@umail.iu.edu>> wrote:
>>>> 
>>>> Hi,
>>>> 
>>>> I cannot get client side code to createExperiment working. It throws error 
>>>> - Error creating resource. Error while retrieving resource. 
>>>> 
>>>> I see that from UI side, creating experiment is a two step process. First 
>>>> is to create experiment giving name and description and select 
>>>> application. 
>>>> Another is to add input files, select compute resource and configurations 
>>>> of cores and RAM to use. But createExperiment function we only set 
>>>> owner,experiment
>>>> name and description. Is there an equivalent function for 2nd step.
>>>> 
>>>> Best,
>>>> Shubham
>>>> 
>>>> On Tue, Dec 5, 2017 at 1:41 PM, Shubham Kumar <shuku...@umail.iu.edu 
>>>> <mailto:shuku...@umail.iu.edu>> wrote:
>>>> Hi,
>>>> 
>>>> While coding, I found that the latest Airavata API library does not 
>>>> contains functions like SearchExperimentsByName , SearchExperimentsByDesc, 
>>>> SearchExperimentsByApplication , getAllUserProjects but they are used in 
>>>> php client side code.
>>>> 
>>>> On Mon, Dec 4, 2017 at 3:27 PM, Suresh Marru <sma...@apache.org 
>>>> <mailto:sma...@apache.org>> wrote:
>>>> Hi Shubham,
>>>> 
>>>> Please replace the python samples with Python 3 instead. Please refer to 
>>>> airavata python client code in Django portal for reference - 
>>>> https://github.com/apache/airavata-django-portal 
>>>> <https://github.com/apache/airavata-django-portal>
>>>> 
>>>> Suresh
>>>> 
>>>> 
>>>>> On Dec 3, 2017, at 1:35 PM, Shubham Kumar <shuku...@umail.iu.edu 
>>>>> <mailto:shuku...@umail.iu.edu>> wrote:
>>>>> 
>>>>> Hello Dev,
>>>>> 
>>>>> As discussed with Suresh, for my assignment 6 and 7, I will be working on 
>>>>> Developing more airavata python samples in python sdk module (JIRA - 
>>>>> https://issues.apache.org/jira/browse/AIRAVATA-1643 
>>>>> <https://issues.apache.org/jira/browse/AIRAVATA-1643>). I will break up 
>>>>> this work into assignment 6 and 7.
>>>>> 
>>>>> I see the current code is written in Python 2.7 and requires Thrift 
>>>>> 0.10.0 to compile.
>>>>> 
>>>>> Best,
>>>>> Shubham
>>>> 
>>>> 
>>>> 
>>> 
>>> 
>> 
>> 
> 
> 

Reply via email to