Uploaded image for project: 'Beam'
  1. Beam
  2. BEAM-2101

Reading public GCS files requires authentication

Details

    • Bug
    • Status: Resolved
    • P2
    • Resolution: Fixed
    • None
    • 2.3.0
    • sdk-py-core
    • None

    Description

      cc: sb2nov

      tibor.kiss@gmail.com reported this on hackathon, while running wordcount. Even though plain gsutil works fine on the public file, wordcount fails. It is possible that some other authentication is required as part of the validation.

      Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "apache_beam/io/textio.py", line 390, in _init_
      skip_header_lines=skip_header_lines)
      File "apache_beam/io/textio.py", line 89, in _init_
      validate=validate)
      File "apache_beam/io/filebasedsource.py", line 103, in _init_
      self._validate()
      File "apache_beam/utils/value_provider.py", line 101, in _f
      return fnc(self, *args, **kwargs)
      File "apache_beam/io/filebasedsource.py", line 163, in _validate
      match_result = FileSystems.match([pattern], limits=[1])[0]
      File "apache_beam/io/filesystems.py", line 81, in match
      return filesystem.match(patterns, limits)
      File "apache_beam/io/gcp/gcsfilesystem.py", line 100, in match
      raise BeamIOError("Match operation failed", exceptions)
      apache_beam.io.filesystem.BeamIOError: Match operation failed with exceptions

      {'gs://apache-beam-samples/shakespeare/hamlet.txt': ApplicationDefaultCredentialsError('The Application Default Credentials are not available. They are available if running in Google Compute Engine. Otherwise, the environment variable GOOGLE_APPLICATION_CREDENTIALS must be defined pointing to a file defining the credentials. See https://developers.google.com/accounts/docs/application-default-credentials for more information.',)}

      Attachments

        Issue Links

          Activity

            People

              udim Udi Meiri
              altay Ahmet Altay
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: