Skip to content

Inserting a row to a table does not work #1030

Closed
@franklili3

Description

@franklili3

Bug report

  • [ *] I confirm this is a bug with Supabase, not with my own application.
  • [* ] I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

When I insert a row to a table, the response 'data' is empty, it does not work.

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. create a table 'test3'
  2. Enable RLS
  3. Add 'Enable insert for authenticated users only' Policy
  4. Add user in ROLE
  5. create python 3.10 virture envionment
  6. add .env file and add envionment viable
  7. run insert_test.py
    please see this repo supabase-py-test.

Expected behavior

A row will be inserted in 'test3' table.

Screenshots

Image
Image
Image

System information

  • OS: [ Windows]

  • Version of supabase-py: [2.11.0]

  • Version of Python: [3.10.0]

Additional context

(p310) C:\myprojects\github\supabase-py-test>python insert_test.py
row_json:  {"accumulated_blocks": 879707}
Traceback (most recent call last):
  File "C:\myprojects\github\supabase-py-test\insert_test.py", line 38, in <module>
    raise Exception(f"Failed to post data: {response3_json}")
Exception: Failed to post data: {'data': [], 'count': None}
```.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions