https://prefect.io logo
m

Mansour Zayer

01/17/2023, 6:42 PM
Hello. I'm using
Prefect 2.7.3
with
prefect_aws 0.2.3 prefect-snowflake 0.25 prefect-sqlalchemy 0.2.2
on windows (running locally for now), and when I run my flow, I get these 3 warnings first (even when I don't use them)
Copy code
Warning!  Failed to load collection 'prefect_aws': ImportError: cannot import name 'CredentialsBlock' from 'prefect.blocks.abstract' 
Warning!  Failed to load collection 'prefect_snowflake': ImportError: cannot import name 'CredentialsBlock' from 'prefect.blocks.abstract'
Warning!  Failed to load collection 'prefect_sqlalchemy': ImportError: cannot import name 'CredentialsBlock' from 'prefect.blocks.abstract'
And when I use
secret_reader
in my flow, I get this error:
Copy code
from prefect.blocks.abstract import CredentialsBlock
ImportError: cannot import name 'CredentialsBlock' from 'prefect.blocks.abstract'
Any ideas what might be the problem? Thanks
n

Nate

01/17/2023, 8:41 PM
Hi @Mansour Zayer The abstract block types (
CredentialsBlock
being an example) were added to prefect core in
2.7.4
, and those collections you are trying to install use the
CredentialsBlock
to define their respective credentials blocks can you upgrade to
prefect>=2.7.4
?
m

Mansour Zayer

01/17/2023, 8:49 PM
Yes, that solves it thanks. Is there another way to read AWS secrets manager secrets in prefect <=2.7.3? I'd have to use the boto core library?