elchicodepython / elchicodepython/python-nocodb

Issues connecting

Aperta
#20 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Python
Stelle
78
Fork
20
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.