open-reaction-database / ord-schema

Schema for the Open Reaction Database
https://open-reaction-database.org
Apache License 2.0
95 stars 26 forks source link

google.protobuf.message.DecodeError: Wrong wire type in tag. #704

Closed Da-vid21 closed 5 months ago

Da-vid21 commented 11 months ago

Describe the bug I was trying to parse the ord-data provided and I keep on getting this error when trying to use ParseFromString function

To Reproduce Steps to reproduce the behavior:

  1. Create a new py file
  2. Use this code import gzip from ord_schema.proto import reaction_pb2 reaction = reaction_pb2.Reaction() with gzip.open('data/00/ord_search_results.pb.gz', 'rb') as f: data = f.read() reaction.ParseFromString(data) print(reaction)
  3. See error

Expected behavior I want to be able to read the dataset so that I can parse the SMILES and chemical reaction name

Screenshots

image

Desktop (please complete the following information):

skearnes commented 7 months ago

Hi @Da-vid21, the search results should give you a Dataset, which won't load into a Reaction. Could you send me the search results you downloaded and I can send you a snippet to read them?

bdeadman commented 5 months ago

Closed due to inactivity.