Traceback (mostrecentcalllast):
File"/home/remco/.local/share/virtualenvs/tmp-35dac56d418be2c/lib/python3.6/site-packages/google/gax/retry.py", line120, ininnerreturnto_call(*args)
File"/home/remco/.local/share/virtualenvs/tmp-35dac56d418be2c/lib/python3.6/site-packages/google/gax/retry.py", line68, ininnerreturna_func(*updated_args, **kwargs)
File"/home/remco/.local/share/virtualenvs/tmp-35dac56d418be2c/lib/python3.6/site-packages/grpc/_channel.py", line507, in__call__return_end_unary_response_blocking(state, call, False, deadline)
File"/home/remco/.local/share/virtualenvs/tmp-35dac56d418be2c/lib/python3.6/site-packages/grpc/_channel.py", line455, in_end_unary_response_blockingraise_Rendezvous(state, None, None, deadline)
grpc._channel._Rendezvous: <_RendezvousofRPCthatterminatedwith (StatusCode.INTERNAL, ReceivedRST_STREAMwitherrorcode2)>Duringhandlingoftheaboveexception, anotherexceptionoccurred:
Traceback (mostrecentcalllast):
File"/home/remco/.local/share/virtualenvs/tmp-35dac56d418be2c/lib/python3.6/site-packages/google/cloud/datastore/_gax.py", line74, in_catch_remap_gax_erroryieldFile"/home/remco/.local/share/virtualenvs/tmp-35dac56d418be2c/lib/python3.6/site-packages/google/cloud/datastore/_gax.py", line173, incommitreturnsuper(GAPICDatastoreAPI, self).commit(*args, **kwargs)
File"/home/remco/.local/share/virtualenvs/tmp-35dac56d418be2c/lib/python3.6/site-packages/google/cloud/gapic/datastore/v1/datastore_client.py", line345, incommitreturnself._commit(request, options)
File"/home/remco/.local/share/virtualenvs/tmp-35dac56d418be2c/lib/python3.6/site-packages/google/gax/api_callable.py", line419, ininnerreturnapi_caller(api_call, this_settings, request)
File"/home/remco/.local/share/virtualenvs/tmp-35dac56d418be2c/lib/python3.6/site-packages/google/gax/api_callable.py", line407, inbase_callerreturnapi_call(*args)
File"/home/remco/.local/share/virtualenvs/tmp-35dac56d418be2c/lib/python3.6/site-packages/google/gax/api_callable.py", line368, ininnerreturna_func(*args, **kwargs)
File"/home/remco/.local/share/virtualenvs/tmp-35dac56d418be2c/lib/python3.6/site-packages/google/gax/retry.py", line126, ininner' classified as transient', exception)
google.gax.errors.RetryError: GaxError(Exceptionoccurredinretrymethodthatwasnotclassifiedastransient, causedby<_RendezvousofRPCthatterminatedwith (StatusCode.INTERNAL, ReceivedRST_STREAMwitherrorcode2)>)
Duringhandlingoftheaboveexception, anotherexceptionoccurred:
Traceback (mostrecentcalllast):
File"/home/remco/example/test.py", line16, intest_put_frozenclient.put(entity)
File"/home/remco/.local/share/virtualenvs/tmp-35dac56d418be2c/lib/python3.6/site-packages/google/cloud/datastore/client.py", line384, inputself.put_multi(entities=[entity])
File"/home/remco/.local/share/virtualenvs/tmp-35dac56d418be2c/lib/python3.6/site-packages/google/cloud/datastore/client.py", line411, input_multicurrent.commit()
File"/home/remco/.local/share/virtualenvs/tmp-35dac56d418be2c/lib/python3.6/site-packages/google/cloud/datastore/batch.py", line273, incommitself._commit()
File"/home/remco/.local/share/virtualenvs/tmp-35dac56d418be2c/lib/python3.6/site-packages/google/cloud/datastore/batch.py", line249, in_commitself.project, mode, self._mutations, transaction=self._id)
File"/home/remco/.local/share/virtualenvs/tmp-35dac56d418be2c/lib/python3.6/site-packages/google/cloud/datastore/_gax.py", line173, incommitreturnsuper(GAPICDatastoreAPI, self).commit(*args, **kwargs)
File"/usr/lib/python3.6/contextlib.py", line100, in__exit__self.gen.throw(type, value, traceback)
File"/home/remco/.local/share/virtualenvs/tmp-35dac56d418be2c/lib/python3.6/site-packages/google/cloud/datastore/_gax.py", line82, in_catch_remap_gax_errorsix.reraise(error_class, new_exc, sys.exc_info()[2])
File"/home/remco/.local/share/virtualenvs/tmp-35dac56d418be2c/lib/python3.6/site-packages/six.py", line685, inreraiseraisevalue.with_traceback(tb)
File"/home/remco/.local/share/virtualenvs/tmp-35dac56d418be2c/lib/python3.6/site-packages/google/cloud/datastore/_gax.py", line74, in_catch_remap_gax_erroryieldFile"/home/remco/.local/share/virtualenvs/tmp-35dac56d418be2c/lib/python3.6/site-packages/google/cloud/datastore/_gax.py", line173, incommitreturnsuper(GAPICDatastoreAPI, self).commit(*args, **kwargs)
File"/home/remco/.local/share/virtualenvs/tmp-35dac56d418be2c/lib/python3.6/site-packages/google/cloud/gapic/datastore/v1/datastore_client.py", line345, incommitreturnself._commit(request, options)
File"/home/remco/.local/share/virtualenvs/tmp-35dac56d418be2c/lib/python3.6/site-packages/google/gax/api_callable.py", line419, ininnerreturnapi_caller(api_call, this_settings, request)
File"/home/remco/.local/share/virtualenvs/tmp-35dac56d418be2c/lib/python3.6/site-packages/google/gax/api_callable.py", line407, inbase_callerreturnapi_call(*args)
File"/home/remco/.local/share/virtualenvs/tmp-35dac56d418be2c/lib/python3.6/site-packages/google/gax/api_callable.py", line368, ininnerreturna_func(*args, **kwargs)
File"/home/remco/.local/share/virtualenvs/tmp-35dac56d418be2c/lib/python3.6/site-packages/google/gax/retry.py", line126, ininner' classified as transient', exception)
google.cloud.exceptions.InternalServerError: 500ReceivedRST_STREAMwitherrorcode2
As of
google-cloud-datastore1.0.0 it no longer works together with freezegun.Workaround: downgrade to
google-cloud-datastore0.23.0Ubuntu 17.04, but it was also reproduced on 16.04.
python --versionpip show google-cloud,pip show google-<service>orpip freezepy.test --tb native
Decorate a function using
freezegun.freeze_timefrom freezegun and put a gcloud datastore entity.The datastore was launched in the background using the following code: