Uploaded image for project: 'Apache Avro'
  1. Apache Avro
  2. AVRO-2768

Python Avro cannot be imported when packaged as a zip-file

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.9.2
    • 1.10.0
    • python
    • None

    Description

      Hi,

      When running a Spark job I am packaging all Python dependencies in a zip-file which is distributed to the nodes. I am using AWS Glue to execute the Spark job.

      One of the dependencies included is the python package avro-python3. However, this cannot be used since VERSION.txt cannot be opened when the package is included as a zip. It errors out in _init_.py when trying to open the file. The file VERSION.txt is present, however the path given to open() looks something like "/home/user/custom-site-package.zip/avro/VERSION.txt".

      On a side note, the package has zip_safe set to true, so I expect this to work

      I have opened a PR on Github with a possible solution.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            calleo Carl Vander
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment