You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@avro.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2024/04/16 01:15:00 UTC
[jira] [Updated] (AVRO-3952) [Python] Python test failures: TypeError: 'Buffer' object is not iterable
[ https://issues.apache.org/jira/browse/AVRO-3952?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ASF GitHub Bot updated AVRO-3952:
---------------------------------
Labels: pull-request-available (was: )
> [Python] Python test failures: TypeError: 'Buffer' object is not iterable
> -------------------------------------------------------------------------
>
> Key: AVRO-3952
> URL: https://issues.apache.org/jira/browse/AVRO-3952
> Project: Apache Avro
> Issue Type: Bug
> Components: python
> Reporter: Martin Tzvetanov Grigorov
> Assignee: Michael A. Smith
> Priority: Major
> Labels: pull-request-available
> Time Spent: 10m
> Remaining Estimate: 0h
>
> Since recently some Python tests started to fail - https://github.com/apache/avro/actions/runs/8111290688/job/22170288605
> {code}
> py: commands_pre[0]> mkdir -p avro/test/interop /home/runner/work/avro/avro/lang/py/../../build/interop/data
> py: commands_pre[1]> cp -r /home/runner/work/avro/avro/lang/py/../../build/interop/data avro/test/interop
> py: commands_pre[2]> coverage run -pm avro.test.gen_interop_data avro/interop.avsc avro/test/interop/data/py.avro
> Traceback (most recent call last):
> File "/home/runner/work/avro/avro/lang/py/avro/test/gen_interop_data.py", line 103, in <module>
> raise SystemExit(main())
> File "/home/runner/work/avro/avro/lang/py/avro/test/gen_interop_data.py", line 98, in main
> generate(args.schema_path, op)
> File "/home/runner/work/avro/avro/lang/py/avro/test/gen_interop_data.py", line 71, in generate
> for codec, data in output:
> File "/home/runner/work/avro/avro/lang/py/avro/test/gen_interop_data.py", line 67, in <genexpr>
> output = ((codec, gen_data(codec, datum_writer, interop_schema)) for codec in CODECS_TO_VALIDATE)
> File "/home/runner/work/avro/avro/lang/py/avro/test/gen_interop_data.py", line 60, in gen_data
> dfw.flush()
> File "/home/runner/work/avro/avro/lang/py/avro/datafile.py", line 277, in flush
> self._write_block()
> File "/home/runner/work/avro/avro/lang/py/avro/datafile.py", line 241, in _write_block
> compressed_data, compressed_data_length = codec.compress(uncompressed_data)
> File "/home/runner/work/avro/avro/lang/py/avro/codecs.py", line 151, in compress
> compressed_data = snappy.compress(data)
> File "/home/runner/work/avro/avro/lang/py/.tox/py/site-packages/snappy/snappy.py", line 78, in compress
> return bytes(_compress(data))
> TypeError: 'Buffer' object is not iterable
> py: exit 1 (1.10 seconds) /home/runner/work/avro/avro/lang/py> coverage run -pm avro.test.gen_interop_data avro/interop.avsc avro/test/interop/data/py.avro pid=2134
> py: commands_post[0]> coverage combine --append
> Combined data file .coverage.fv-az882-457.2134.989353
> py: commands_post[1]> coverage report
> {code}
> In addition running `./build.sh test` fails:
> {code}
> avro/lang/py on main [$?] via 🐍 v2.7.18
> ❯ ./build.sh clean
> avro/lang/py on main [$?] via 🐍 v2.7.18
> ❯ ./build.sh test
> /bin/python3: No module named tox
> {code}
> Do I need to install tox in the global libraries ? Could we (auto-)use virtual environment in build.sh ?
--
This message was sent by Atlassian Jira
(v8.20.10#820010)