When calling `flow.register` I'm seeing the follow...
# prefect-community
j
When calling
flow.register
I'm seeing the following strange stack:
Copy code
flow.register(project_name="default")
  File "/home/joe/.local/share/virtualenvs/flows/lib/python3.8/site-packages/prefect/core/flow.py", line 1655, in register
    registered_flow = client.register(
  File "/home/joe/.local/share/virtualenvs/flows/lib/python3.8/site-packages/prefect/client/client.py", line 771, in register
    serialized_flow = flow.serialize(build=build)  # type: Any
  File "/home/joe/.local/share/virtualenvs/flows/lib/python3.8/site-packages/prefect/core/flow.py", line 1462, in serialize
    storage = self.storage.build()  # type: Optional[Storage]
  File "/home/joe/.local/share/virtualenvs/flows/lib/python3.8/site-packages/prefect/environments/storage/docker.py", line 359, in build
    self._build_image(push=push)
  File "/home/joe/.local/share/virtualenvs/flows/lib/python3.8/site-packages/prefect/environments/storage/docker.py", line 423, in _build_image
    self._parse_generator_output(output)
  File "/home/joe/.local/share/virtualenvs/flows/lib/python3.8/site-packages/prefect/environments/storage/docker.py", line 658, in _parse_generator_output
    output = (
AttributeError: 'NoneType' object has no attribute 'strip'
  `
🤷‍♂️ 1
👍 1
Copy code
output = (
                    parsed.get("stream")
                    or parsed.get("message")
                    or parsed.get("errorDetail", {}).get("message")
                ).strip("\n")
                if output:
                    print(output)
This is the culprit, if you need to assert the output you can't blindly strip it
The guilty field is
Copy code
{'stream': 'Removing intermediate container e92479882653\n'}
Removing intermediate container e92479882653
{'stream': ' ---> 91c2b194ac0a\n'}
 ---> 91c2b194ac0a
{'aux': {'ID': 'sha256:91c2b194ac0a59b440144e8ab680aee2152fc2dba0b86c112c1116eca256aed4'}}
This docker edge case should be accounted for
f
I saw that error yesterday on version 0.13.17. 0.13.16 working perfectly.
👍 1
s
We’re seeing that today too, though I was having it on 0.13.14.
r
same
j
who do we ping to patch this @Zanie
@Michael Adkins
z
Hi. Prefect is closed today, but this fix is in master already https://github.com/PrefectHQ/prefect/pull/3717
We’ve also added coverage for this case. Unfortunately, integration tests with docker isn’t setup in CI yet and this was missed in the manual testing.
Also thanks for providing the offending field! I was quite curious if it was something we should be logging.
😀 2
s
@Zanie I am still getting this error with new version of Prefect 14.0 When I am following these module path names in files param of docker storage