Skip to content

Error when Foxx is disabled on the server #247

@grahamlyons

Description

@grahamlyons

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions