Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when Foxx is disabled on the server #247

Open
grahamlyons opened this issue Nov 22, 2024 · 0 comments · May be fixed by #248
Open

Error when Foxx is disabled on the server #247

grahamlyons opened this issue Nov 22, 2024 · 0 comments · May be fixed by #248

Comments

@grahamlyons
Copy link

If Foxx is disabled on the ArangoDB server then the reload() method on the Foxx class will raise an error:

requests.exceptions.HTTPError: 501 Server Error: Not Implemented for url: https://arango:8529/_db/example/_api/foxx?excludeSystem=False

https://docs.arangodb.com/3.12/components/arangodb-server/options/#--foxxenable

Python: 3.12.4
pyArango: 2.0.2

Traceback:

    raise HTTPError(http_error_msg, response=self)
  File "/app/.venv/lib/python3.12/site-packages/requests/models.py", line 1021, in raise_for_status
    response.raise_for_status()
  File "/app/.venv/lib/python3.12/site-packages/pyArango/foxx.py", line 36, in get_available_services
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    self.services = self.get_available_services()
  File "/app/.venv/lib/python3.12/site-packages/pyArango/foxx.py", line 40, in reload
    self.foxx.reload()
  File "/app/.venv/lib/python3.12/site-packages/pyArango/database.py", line 98, in reload
    self.reload()
  File "/app/.venv/lib/python3.12/site-packages/pyArango/database.py", line 32, in __init__
    Database.__init__(self, connection, name)
  File "/app/.venv/lib/python3.12/site-packages/pyArango/database.py", line 549, in __getattr__
           ^^^^^^^^^^^^^^^^
    return self.collections[collectionName]
  File "/app/.venv/lib/python3.12/site-packages/pyArango/database.py", line 532, in __getitem__
           ~~~~^^^^^^^^
    return self[sid[0]][sid[1]]
  File "/app/.venv/lib/python3.12/site-packages/pyArango/database.py", line 144, in fetchDocument
@grahamlyons grahamlyons linked a pull request Nov 25, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant