hyperledger-archives / education-sawtooth-simple-supply

https://wiki.hyperledger.org/display/LMDWG
Apache License 2.0
51 stars 61 forks source link

Fix Protobuf Error with serialized_options #30

Closed danintel closed 5 years ago

danintel commented 5 years ago

Error was: TypeError: new() got an unexpected keyword argument 'serialized_options' This requires Protobuf 3.6.0 or above to support serialized_options, but repo.sawtooth.me is only at Protobuf 3.4.1 for Sawtooth 1.0 and 1.1 at least.

The fix is to remove the unsupported serialized_options argument.

Signed-off-by: danintel daniel.anderson@intel.com

danintel commented 5 years ago

A symptom of the error is this message appearing after typing docker-compose up, causing 3 containers to not run (simple-supply-rest-api, simple-supply-tp, and simple-supply-subscriber):

TypeError: __new__() got an unexpected keyword argument 'serialized_options'

The error occurred while processing Dockerfile for the respective container.

This error was reported in bugs #24 and #26.

dplumb94 commented 5 years ago

I don't think we should manually edit the generated protos. Would installing a newer version of protobuf in the containers fix this?

danintel commented 5 years ago

The manual editing is a workaround. The basic problem with Protobuf in repo.sawtooth.me is the protoc compiler is newer than the protobuf library. Protoc generates stuff that the protobuf library does not understand.

A newer or at least consistent version of protobuf would fix this, but repo.sawtooth.me is beyond my control (and beyond the control of most people).

Dan

From: dplumb94 notifications@github.com Sent: Wednesday, May 29, 2019 1:44 PM To: hyperledger/education-sawtooth-simple-supply education-sawtooth-simple-supply@noreply.github.com Cc: Anderson, Daniel daniel.anderson@intel.com; Author author@noreply.github.com Subject: Re: [hyperledger/education-sawtooth-simple-supply] Fix Protobuf Error with serialized_options (#30)

I don't think we should manually edit the generated protos. Would installing a newer version of protobuf in the containers fix this?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/hyperledger/education-sawtooth-simple-supply/pull/30?email_source=notifications&email_token=AH26URPEOWUGN4QM2PVFF3LPX3TJ5A5CNFSM4HNQS5A2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWQSYUI#issuecomment-497101905, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AH26URIKTRCLWPHYIZ6AHWLPX3TJ5ANCNFSM4HNQS5AQ.

danintel commented 5 years ago

Closing this PR in favor of PR #32 Update to Sawtooth 1.2. That PR, #32, fixes the problem of the corrupt protobuf packages in the internal sawtooth.me repository for Sawtooth 1.0 and 1.1 (Xenial) because the latest Sawtooth 1.2 uses Bionic instead of Xenial, which has up-to-date protobuf compiler and libraries.