supabase-community / storage-py

Home Page:https://supabase-community.github.io/storage-py/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Getting !!! TypeError: __init__() got an unexpected keyword argument 'file_size_limit'

starascendin opened this issue · comments

Describe the bug
Using supabase 1.0.1 and storage3 0.5.0, i'm getting error !!! TypeError: __init__() got an unexpected keyword argument 'file_size_limit'

        res = self._request("GET", f"/bucket/{id}")
        json = res.json()
        return SyncBucket(**json, _client=self._client)

I'm also getting this error. Could it be to do with the update to postgrest-py that happened in the last 18 hours?

This is likely do to a change in the storage.buckets table adding new columns for coming features(?)....
image

This changes was rolled out a few days ago here: supabase/storage#277

And likely just hit instances in the past day.

Thanks for that - it's answered the question :D but is there anything I can do to fix this or do we need to wait for a dev?

Seems like python cares about the structure of the buckets table for some reason, but as I mentioned in Discord I don't know anything about python. Is there away to turn off the "type checking" that is going on? Otherwise, if you could figure out in this python code what needs to be added to deal with the new columns and generate your own temp version that would be one way.

I don't think it is wise, or possibly even possible, to delete those columns from storage.buckets until it gets fixed here as that might break the storage-api code.

How long does it normally take to fix issues. I can assume this one isn't too difficult.

@starascendin
@conanmalanaphy

This PR fixes the issue for me.

Uninstall storage3 and install it with pip

pip uninstall storage3
pip install git+https://github.com/supabase-community/storage-py.git@refs/pull/72/merge

@starascendin @conanmalanaphy

This PR fixes the issue for me.

Uninstall storage3 and install it with pip

pip uninstall storage3
pip install git+https://github.com/supabase-community/storage-py.git@refs/pull/72/merge

confirm this fixes the issue.

Hope the devs can merge in this fix and update the package. Thanks @ChartierLuc for putting this up 🔥

Hey team,

Thanks for the quick PR! One of the Python Maintainers here - we'll review by end of day and have a release out by the end of the weekend :)

published new release, feel free to ping me again if there are issues.

Once again, thanks @ChartierLuc for the PR!