surrealdb / surrealdb.py

SurrealDB SDK for Python
https://surrealdb.com
Apache License 2.0
181 stars 53 forks source link

Bug: Surreal.query("SLEEP") returns "IAM error: Not enough permissions to perform this action" #94

Closed dimentyy closed 6 months ago

dimentyy commented 6 months ago

The bug

Surreal.query("SLEEP") returns [{"result": "IAM error: Not enough permissions to perform this action", status: "ERR", time="116.125µs"}]

It might be not only SLEEP

Steps to reproduce

Python code:

from surrealdb import Surreal

async with Surreal(...) as db:
    print(await db.query("SLEEP 1s"))  # Will print an error

Using $ surreal sql shell:

> SLEEP 1s  -- Will be fine

Expected behaviour

Actually 'sleeping' for 1s

SurrealDB version

1.3.1 for macos on aarch64

surrealdb.py version

0.3.2 for macos on aarch64 using Python 3.12

Contact Details

No response

Is there an existing issue for this?

Code of Conduct

dimentyy commented 6 months ago

I'll open it in the main repository