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

Bug: Specific UNICODE string error? #56

Closed
2 tasks done
keigon opened this issue Apr 19, 2023 · 1 comment
Closed
2 tasks done

Bug: Specific UNICODE string error? #56

keigon opened this issue Apr 19, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@keigon
Copy link

keigon commented Apr 19, 2023

Describe the bug

When I try to enter a specific unicode string into surrealDB using the python client, I get a parse error.

import asyncio
from surrealdb import Surreal

async def test():
    """Example of how to use the SurrealDB client."""
    async with Surreal("ws://localhost:8000/rpc") as db:
        await db.signin({"user": "root", "pass": "root"})
        await db.use("test", "test")
        await db.create(
            "person",
            {
                "user": "제10",
            },
        )

if __name__ == "__main__":
    import asyncio

    asyncio.run(test())

Result:

  File "......database/test.py", line 9, in test
    await db.create(
  File "....../lib/python3.9/site-packages/surrealdb/ws.py", line 482, in create
    success: ResponseSuccess = _validate_response(
  File "....../lib/python3.9/site-packages/surrealdb/ws.py", line 161, in _validate_response
    raise exception(response.message)
surrealdb.ws.SurrealPermissionException: Parse error

Errors occur on strings like "제10", "가1234"

Steps to reproduce

[[package]]
name = "surrealdb"
version = "0.3.0"

Expected behaviour

Expecting a normal DB INSERT

SurrealDB version

1.0.0-beta.9+20230402.5eafebd for macos on aarch64

surrealdb.py version

0.3.0

Contact Details

No response

Is there an existing issue for this?

  • I have searched the existing issues

Code of Conduct

  • I agree to follow this project's Code of Conduct
@keigon keigon added the bug Something isn't working label Apr 19, 2023
@AlexFrid AlexFrid self-assigned this Apr 19, 2023
@AlexFrid AlexFrid mentioned this issue Apr 20, 2023
7 tasks
@AlexFrid
Copy link
Contributor

Thanks for letting us know about this bug, it has been fixed now, and a new release 0.3.1 is out on PyPi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants