Fork me on GitHub
#xtdb
<
2024-04-11
>
Sagar Vrajalal11:04:44

I've been trying to use the xtsql.py utility but it throws an error. Am I doing something wrong?

❯ python3 --version
Python 3.8.10
❯ python3 xtsql.py --url=
  File "xtsql.py", line 86
    match obj.get('@type', None):
          ^
SyntaxError: invalid syntax

refset11:04:27

Hey @U01B1CZQ9PF sorry about this - match is only supported in Python 3.10 onwards, so you can either upgrade Python or modify the uses of match to be if ... else ... instead

refset11:04:52

actually I thought I had already made this change to avoid match, but evidently not :thinking_face:

refset11:04:53

this version removes the two uses of match

Sagar Vrajalal11:04:31

Thanks @U899JBRPF I just upgraded Python 🙂

refset12:04:05

cool, thanks for your patience ☺️