TanuSharma2511 commented on code in PR #34716:
URL: https://github.com/apache/beam/pull/34716#discussion_r2068443590


##########
sdks/python/apache_beam/transforms/ptransform.py:
##########
@@ -560,7 +560,14 @@ def get_windowing(self, inputs):
     with the input PCollection (or the first input if several).
     """
     if inputs:
-      return inputs[0].windowing
+      try:
+        return inputs[0].windowing
+      except:
+        raise AttributeError(
+            f"'{type(inputs[0]).__name__}' object has no"
+            " attribute 'windowing'. Expected a PCollection as input,"
+            f" but received '{type(inputs[0]).__name__}'. "
+            "Did you accidentally pass a Pipeline object or a PBegin?")

Review Comment:
   Thanks @hjtran I'll check on this. Meanwhile, @tvalentyn do you have any 
suggestion here ?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@beam.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to