Hi,

Unfortunately, Avro library currently doesn't work well with Python  3.
Could you try using fastavro in your pipeline and report back if that
helped to resolve your issue? We are also making fastavro a default option,
likely starting from 2.13.0. You could use fastavro as follows

(sent from Phone, apologies for possible errors):

WriteToAvro(
          ...,
          use_fastavro=True
      )




*From:*Chengxuan Wang <wcxz...@gmail.com>
*Date:*Fri, May 3, 2019, 8:30 PM
*To:* <user@beam.apache.org>

Hi,
> I am trying to create a PTransform to combine avro schemas. But I met
> `json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)`,
> I think It is related to
> https://github.com/apache/avro/blob/master/lang/py3/avro/schema.py#L1058 .
> Because avro didn't implement __ne__, it will use __eq__ delegated.
>
> Then I saw there is `without_default` method in CombineGlobally, so I add
> that. Now I get `xception: Attempting to map key 'b' to value
> <avro.schema.Field object at 0x7f71b435ec50> in ImmutableDict {} [while
> running 'WriteToAvro/_WriteToAvroWithNoSchema/WriteBundles']`.
>
> Does anyone have this problem before? I am using python3 with apache-beam
> 2.12.0(the latest one)?
>
> It works fine under python2, but can't work under python3.
>
> Thanks,
> Chengxuan
>

Reply via email to