Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Issues connecting #20

Open
Open
@elect86

Description

Hi,

nice project!

I'm trying to connect and list the table row using

# Usage with API Token
client = NocoDBRequestsClient(
 # Your API Token retrieved from NocoDB conf
 APIToken(token),
 # Your nocodb root path
 "http://192.168.11.104:8080"
)
project = NocoDBProject(
 "noco", # org name. noco by default
 "myproject" # project name. Case sensitive!!
)
# Retrieve a page of rows from a table
table_rows = client.table_row_list(project, "Table")
print(table_rows)

But I keep getting

Traceback (most recent call last):
File "/home/elect/PycharmProjects/datalad_automation/venv/lib/python3.12/site-packages/nocodb/infra/requests_client.py", line 28, in _request
response.raise_for_status()
File "/home/elect/PycharmProjects/datalad_automation/venv/lib/python3.12/site-packages/requests/models.py", line 1024, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: http://192.168.11.104:8080/api/v1/db/data/noco/myproject/Table

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/elect/PycharmProjects/datalad_automation/nocodb/main.py", line 25, in
table_rows = client.table_row_list(project, "Table")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/elect/PycharmProjects/datalad_automation/venv/lib/python3.12/site-packages/nocodb/infra/requests_client.py", line 49, in table_row_list
return self._request(
^^^^^^^^^^^^^^
File "/home/elect/PycharmProjects/datalad_automation/venv/lib/python3.12/site-packages/nocodb/infra/requests_client.py", line 33, in _request
raise NocoDBAPIError(
nocodb.exceptions.NocoDBAPIError: 403 Client Error: Forbidden for url: http://192.168.11.104:8080/api/v1/db/data/noco/myproject/Table

I don't really understand why do I need a project object, which are supposed to be its org and project name

Could you help me, please?

Thanks in advance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /