Closed kmajeshkrishnan closed 3 years ago
One thing, have you tried using the CUDS object inside the with statement instead of outside? Like this.
app.logger.info(' **************** Info level log started ****************')
try:
with TransportWrapperCls(*conn_args, **conn_kwargs) as session:
wrapper = cuba.Wrapper(session=session)
all_proposals = wrapper.session.load_by_oclass(
oclass=mt.cottbus_iteration_id)
all_proposals.sort(key=lambda obj: obj.value)
arr =[]
proposal = all_proposals[0]
temperature = proposal.get(
oclass=mt.temperature, rel=mt.is_part_of)[0]
strain_rate = proposal.get(
oclass=mt.strain_rate, rel=mt.is_part_of)[0]
# temp, strain = _get_temp_strain_tuple_from_id_cuds(proposal)
app.logger.info(str(temperature))
app.logger.info("===========" + str(pretty_print(temperature)) + "============")
Worked like a chram :)
osp-core version 3.5.5 installed on both client and server side throws a server error exception while accessing a cuds object. The server already contains the values and connection is established via DataspaceSession