This repository has been archived by the owner on Jul 31, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 32
ImportError: cannot import name 'Parse' from 'avro.schema' #62
Comments
Hi there, looks like there might be an issue with the downstream Avro
dependency. Let me try to recreate.
…On Tue, Jan 19, 2021 at 4:59 PM Milan Jain ***@***.***> wrote:
I installed tensorflow-recorder using the command: pip install tfrecorder.
The package installs without any error, however, I am getting the following
error when trying to import the package.
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-1-63673124a3e9> in <module>
4 import pandas as pd
5
----> 6 import tfrecorder
7 import tensorflow as tf
~\Anaconda3\envs\tfrecords\lib\site-packages\tfrecorder\__init__.py in <module>
17 """Imports."""
18
---> 19 from tfrecorder import accessor
20 from tfrecorder.converter import convert
21 from tfrecorder.dataset_loader import load
~\Anaconda3\envs\tfrecords\lib\site-packages\tfrecorder\accessor.py in <module>
26 from IPython.core import display
27
---> 28 from tfrecorder import converter
29 from tfrecorder import constants
30 from tfrecorder import input_schema
~\Anaconda3\envs\tfrecords\lib\site-packages\tfrecorder\converter.py in <module>
25 from typing import Any, Dict, Optional, Sequence, Tuple, Union
26
---> 27 import apache_beam as beam
28 import pandas as pd
29 import tensorflow as tf
~\Anaconda3\envs\tfrecords\lib\site-packages\apache_beam\__init__.py in <module>
94
95 from apache_beam import coders
---> 96 from apache_beam import io
97 from apache_beam import typehints
98 from apache_beam import version
~\Anaconda3\envs\tfrecords\lib\site-packages\apache_beam\io\__init__.py in <module>
21 from __future__ import absolute_import
22
---> 23 from apache_beam.io.avroio import *
24 from apache_beam.io.filebasedsink import *
25 from apache_beam.io.iobase import Read
~\Anaconda3\envs\tfrecords\lib\site-packages\apache_beam\io\avroio.py in <module>
56 from avro import io as avroio
57 from avro import datafile
---> 58 from avro.schema import Parse
59 from fastavro.read import block_reader
60 from fastavro.write import Writer
ImportError: cannot import name 'Parse' from 'avro.schema' (C:\Users\xxxxx\Anaconda3\envs\tfrecords\lib\site-packages\avro\schema.py)
*Solutions Tried:*
1. Tried installing tensorflow-recorder through pip3 after learning it
might be python2/python3 issue from here
<https://stackoverflow.com/questions/40732419/how-to-read-avro-files-in-python-3-5-2>
.
2. Tried removing avro to enforce this package to use avro-python3 but
looks like it needs avro.
Can somebody please help me with this?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#62>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA5N3Y6JOVQJ6L7SJOSXBTDS2YFENANCNFSM4WJVH4KQ>
.
|
@mbernico: were you able to replicate the issue? |
Yes I was. I don't have a solution yet though. It appears that something
in avro is broken, which is a dependency of dataflow, downstream of us, so
we don't control the versioning. When I get a free moment I can try to
figure out what's happened in the avro code base. Thanks for your patience.
…On Fri, Jan 22, 2021 at 1:56 PM Milan Jain ***@***.***> wrote:
@mbernico <https://github.com/mbernico>: were you able to replicate the
issue?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#62 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA5N3Y6G7FSARTFNNAD4G4DS3HKAFANCNFSM4WJVH4KQ>
.
|
Both the |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I installed tensorflow-recorder using the command:
pip install tfrecorder
. The package installs without any error, however, I am getting the following error when trying to import the package.Solutions Tried:
tensorflow-recorder
throughpip3
after learning it might be python2/python3 issue from here.avro
to enforce this package to useavro-python3
but looks like it needs avro.Can somebody please help me with this?
The text was updated successfully, but these errors were encountered: