education-sawtooth-simple-supply icon indicating copy to clipboard operation
education-sawtooth-simple-supply copied to clipboard

Rest Api failed to build

Open Enthusiast-block opened this issue 3 years ago • 2 comments

Hi, I am trying to run the sample application in my system. I am following the edx course and after I have cloned the repo.

I do a docker-compose up, and the this issue comes up :-

E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/l/linux/linux-libc-dev_4.15.0-139.143_amd64.deb 404 Not Found [IP: 91.189.88.142 80] E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing? ERROR: Service 'simple-supply-rest-api' failed to build : The command '/bin/sh -c apt-get install -y --allow-unauthenticated -q python3-grpcio-tools python3-pip python3-sawtooth-rest-api python3-sawtooth-sdk' returned a non-zero code: 100

Can anyone explains why this comes and how can it be resolved?

Enthusiast-block avatar Apr 02 '21 21:04 Enthusiast-block

i am trying to do the same, looking at the logs, it seems like there is a bug:

simple-supply-rest-api      | Traceback (most recent call last):
simple-supply-rest-api      |   File "/project/sawtooth-simple-supply/bin/simple-supply-rest-api", line 27, in <module>
simple-supply-rest-api      |     from simple_supply_rest_api.main import main
simple-supply-rest-api      |   File "/project/sawtooth-simple-supply/rest_api/simple_supply_rest_api/main.py", line 29, in <module>
simple-supply-rest-api      |     from simple_supply_rest_api.messaging import Messenger
simple-supply-rest-api      |   File "/project/sawtooth-simple-supply/rest_api/simple_supply_rest_api/messaging.py", line 26, in <module>
simple-supply-rest-api      |     from simple_supply_rest_api.transaction_creation import \
simple-supply-rest-api      |   File "/project/sawtooth-simple-supply/rest_api/simple_supply_rest_api/transaction_creation.py", line 23, in <module>
simple-supply-rest-api      |     from simple_supply_protobuf import payload_pb2
simple-supply-rest-api      |   File "/project/sawtooth-simple-supply/protobuf/simple_supply_protobuf/payload_pb2.py", line 21, in <module>
simple-supply-rest-api      |     create_key=_descriptor._internal_create_key,
simple-supply-rest-api      | AttributeError: module 'google.protobuf.descriptor' has no attribute '_internal_create_key'
simple-supply-rest-api exited with code 1

webpioneer avatar Apr 23 '21 17:04 webpioneer

if you are still looking for a solution, one guy in the previous issues wrote: " This is due to version mismatch. Go to /shell/Dockerfile at line 39 change grpcio-tools \ with grpcio-tools==1.29.0 . This will solve your issue. You can check out my updated version of sawtooth-marketplace. "

webpioneer avatar Apr 23 '21 17:04 webpioneer