Skip to content
This repository was archived by the owner on Sep 8, 2025. It is now read-only.
This repository was archived by the owner on Sep 8, 2025. It is now read-only.

TypeError: __init__() got an unexpected keyword argument 'file_size_limit' #77

@charlieamer

Description

@charlieamer

Describe the bug
In production environment I get the error in title. In local development however, I don't get that error. This is the stacktrace:

Traceback (most recent call last):
  File ...
    bucket = client.storage().get_bucket('tasks')
  File ".../storage3/_sync/bucket.py", line 52, in get_bucket
    return SyncBucket(**json, _client=self._client)
TypeError: __init__() got an unexpected keyword argument 'file_size_limit'

I solved this by adding 2 properties to BaseBucket in types.py:

file_size_limit: int
allowed_mime_types: list[string]

However when I add these 2 lines, the development environment stops working because of new error: TypeError: __init__() missing 2 required positional arguments: 'file_size_limit' and 'allowed_mime_types'

To Reproduce

f = open('test.txt', 'w')
f.write("HELLO WORLD")
f.close()
client = create_client(os.environ['SUPABASE_URL'], os.environ['SUPABASE_KEY'])
# create SOME_BUCKET in your supabase
client.storage().get_bucket('SOME_BUCKET').upload('test.txt', 'test.txt')

Expected behavior
No error

Screenshots
/

Desktop (please complete the following information):

  • Ubuntu
  • Python 3.9

Additional context
/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions