I'm following the docs closely here, but the same ...
# ask-community
j
I'm following the docs closely here, but the same syntax used in the docs isn't working for me when I try to move a file from one S3 folder to another. How do I work around this error?
'S3Bucket' object has no attribute 'move_object'
1
d
Can you double check your versions?
j
Is this something that was released in a more recent version only?
d
Yes, end of last week
j
I can upgrade on my local easily enough
Ahhhh
This newest release is stable already?
d
Passed all tests. You can find the source code here, and the PR here. If you think there's something that needs fixing, feel free to submit an issue
j
Thanks for the info! What was the previously extant method for moving?
d
There wasn't one. If you wanted to move an object, you had to create a boto3 client yourself and do it. The code would be similar to what's in the
move_object
method.
j
Ok, that all clicks. Thanks again!
👍 1
Copy code
Traceback (most recent call last):

  File "/var/folders/9z/60j637fx3pqfjsm07kmws_bw0000gn/T/ipykernel_55835/2223188433.py", line 10, in <module>
    from prefect_snowflake.credentials import SnowflakeCredentials

  File "/Users/jacobbedard/opt/anaconda3/envs/prefect-2-env/lib/python3.9/site-packages/prefect_snowflake/__init__.py", line 2, in <module>
    from prefect_snowflake.credentials import SnowflakeCredentials  # noqa

  File "/Users/jacobbedard/opt/anaconda3/envs/prefect-2-env/lib/python3.9/site-packages/prefect_snowflake/credentials.py", line 42, in <module>
    class SnowflakeCredentials(CredentialsBlock):

  File "pydantic/main.py", line 198, in pydantic.main.ModelMetaclass.__new__

  File "pydantic/fields.py", line 506, in pydantic.fields.ModelField.infer

  File "pydantic/fields.py", line 436, in pydantic.fields.ModelField.__init__

  File "pydantic/fields.py", line 552, in pydantic.fields.ModelField.prepare

  File "pydantic/fields.py", line 668, in pydantic.fields.ModelField._type_analysis

  File "/Users/jacobbedard/opt/anaconda3/envs/prefect-2-env/lib/python3.9/typing.py", line 852, in __subclasscheck__
    return issubclass(cls, self.__origin__)

TypeError: issubclass() arg 1 must be a class
Just trying to load everything up again after updating here
Do you know why it's throwing this error?
Perhaps I don't need to run
from prefect_snowflake.credentials import SnowflakeCredentials
if I already have a snowflake credentials block built into the snowflake connector block?
nvm the error still throws after I removed the import of snowflakecredentials
trying to update pydantic...
does not fix the issue
Oh, now I've got a new set of issues after upgrading
😆 1
ok, played a bit of musical chairs with some other packages and versions, and it's working now. Thank you!
🙌 1
d
Sounds like toying with package versions. Glad to be of help
🙌 1
j
Thanks for the new functions 🙂