Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python generation breaking python client #52

Open
becash opened this issue Apr 21, 2023 · 0 comments
Open

Python generation breaking python client #52

becash opened this issue Apr 21, 2023 · 0 comments

Comments

@becash
Copy link

becash commented Apr 21, 2023

Hi, im use your module to generate a custom graphql scheme, im very satisfied how it work in conection with go, bou wnen im try to generate python client from same proto files, python client not work

try to understand why, and find something:

  1. in python appear a import like :
    from danielvladco.go_proto_gql import graphql_pb2 as danielvladco_dot_go__proto__gql_dot_graphql__pb2
    but this module cannot exist

  2. when im inversigate a problem one im create a "empty" module just to resolve a import exception, but appear second problem, few rows after in py file appear a row like

DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x13wallet/common.proto\x12\x06wallet\x1a'danielvladco/go-proto-gql/graphql.proto"\x1e\n\x06UserID\x12\x14\n\x04uuid\x18\x01 \x01(\tB\x06\xb2\xe0\x1f\x02\x08\x01"\x17\n\x07\x42\x61lance\x12\x0c\n\x04\x63\x61sh\x18\x01 \x01(\x02"G\n\tMultiLang\x12\x12\n\x02ro\x18\x01 \x01(\tB\x06\xb2\xe0\x1f\x02\x08\x01\x12\x12\n\x02ru\x18\x02 \x01(\tB\x06\xb2\xe0\x1f\x02\x08\x01\x12\x12\n\x02\x65n\x18\x03 \x01(\tB\x06\xb2\xe0\x1f\x02\x08\x01"\xd6\x01\n\x1aUpsertPaymentMethodRequest\x12\x0f\n\x02id\x18\x01 \x01(\tH\x00\x88\x01\x01\x12(\n\x05title\x18\x02 \x01(\x0b\x32\x11.wallet.MultiLangB\x06\xb2\xe0\x1f\x02\x08\x01\x12.\n\x0b\x64\x65scription\x18\x03 \x01(\x0b\x32\x11.wallet.MultiLangB\x06\xb2\xe0\x1f\x02\x08\x01\x12\x15\n\x05image\x18\x04 \x01(\tB\x06\xb2\xe0\x1f\x02\x08\x01\x12/\n\x04type\x18\x05 \x01(\x0e\x32\x19.wallet.PaymentMethodTypeB\x06\xb2\xe0\x1f\x02\x08\x01\x42\x05\n\x03_id"0\n\x1a\x44\x65letePaymentMethodRequest\x12\x12\n\x02id\x18\x01 \x01(\tB\x06\xb2\xe0\x1f\x02\x08\x01"N\n\x15PaymentMethodsRequest\x12,\n\x04type\x18\x01 \x01(\x0e\x32\x19.wallet.PaymentMethodTypeH\x00\x88\x01\x01\x42\x07\n\x05_type"H\n\x16PaymentMethodsResponse\x12.\n\x0fpayment_methods\x18\x01 \x03(\x0b\x32\x15.wallet.PaymentMethod"\xb1\x01\n\rPaymentMethod\x12\n\n\x02id\x18\x01 \x01(\t\x12 \n\x05title\x18\x02 \x01(\x0b\x32\x11.wallet.MultiLang\x12&\n\x0b\x64\x65scription\x18\x03 \x01(\x0b\x32\x11.wallet.MultiLang\x12\r\n\x05image\x18\x04 \x01(\t\x12'\n\x04type\x18\x05 \x01(\x0e\x32\x19.wallet.PaymentMethodType\x12\x12\n\nmin_amount\x18\x06 \x01(\x03*=\n\x11PaymentMethodType\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\n\n\x06ONLINE\x10\x01\x12\x0b\n\x07OFFLINE\x10\x02\x42\x35H\x01Z1git.simpals.com/Simpals/simpalsapis/gen_go/walletb\x06proto3')

and this row raise a error:

TypeError: Couldn't build proto file into descriptor pool: Depends on file 'danielvladco/go-proto-gql/graphql.proto', but it has not been loaded

Two questions:

  1. How i can resolve this? I can "cover" eror one , but second... remain open
  2. You not check a python generation? ( im understand you module in go oriented )... but how about a another languages?
    Thanks
@becash becash changed the title Python generation breaking Python generation breaking python client Apr 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant