elchicodepython / elchicodepython/python-nocodb

Issues connecting

Ouverte
#20 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Python
Étoiles
78
Forks
20
Métriques de merge des PR
Aucune PR mergée en 30 j

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

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.