Were there any changes made to prefect (using imag...
# ask-community
m
Were there any changes made to prefect (using image 2.10.20) last night around 9:45pm CT that would have cause the error
Failed to load collection 'prefect_aws': ImportError: cannot import name 'BlockNotSavedError' from 'prefect.blocks.core'
n
sorry, do you mean changes to prefect cloud? and you’re using a 2.10.20 version of prefect?
m
I'm not quite sure... Just looking for any changes which would have caused this issue to arise with no changes on our end. We are looking into it further, but nothing has shown up yet.
So, I updated the image the worker uses to 2.14.13 and it worked. But the jobs seemed to have ran differently
n
hmm can you explain more how you end up with the runtime env where you get your error? like dockerfile / hard pins in reqs - if you’re not explicitly installing prefect-aws i would
m
So we are using the prefect base image (
prefecthq/prefect:2.10.20-python3.10
), and not creating the dockerfile or env for the worker. Is there an easy way to specify the installation in the command to specify the prefect-aws version
e
Hey @Mitch 👋 Looks like there was a change to
prefect-aws
on December 11th that was released as version 0.4.6.
I don’t believe you can pin a version with the
--install-policy
command, but there is a way to do so with environment variables.
Since you’re using a Prefect base image, you can specify the env var
EXTRA_PIP_PACKAGES
which will install any packages on image start. This happens as part of our entrypoint to the image. So if you set
EXTRA_PIP_PACKAGES="prefect-aws<0.4.6"
I believe that should fix it.
👍 1
Alternatively, you can persist the
AwsCredentials
block in the UI or by calling its
.save
method that presumably you’re instantiating dynamically… at least that’s what I think based on that code message.