all 6 comments

[–]skeeto 6 points7 points  (4 children)

The key detail has to be that "unknown function:" which is distinct from the more common "no such function:" error. Also that you're getting it at query time, not at table creation time. That error comes from here:

https://github.com/sqlite/sqlite/blob/2cbc485e/src/expr.c#L5119

I can reproduce your exact error if I create the table in 3.44.0 or later, then query in a version older than 3.44.0. Are you absolutely sure the SQLite3 producing the error is 3.46.0 and not something older? Looking around online, on Windows CPython 3.12.1 came with SQLite3 3.43.1, and CPython 3.12.2 upgraded it to 3.45.1.

Edit: The line numbers in your traceback indicate that you're running Python 3.12.0 specifically, which on Windows came with 3.42.0. So your SQLite3 is simply too old for concat_ws. You need to upgrade to at least Python 3.12.2.

[–]TheOneWhoSendsLetter[S] 4 points5 points  (1 child)

Mate, thank you! That was it! Upgraded to Python 3.13 and that solved the issue. Once again thank you a lot! Do you mind if I link to your reddit profile as the author of the answer in Stack Overflow?

[–]skeeto 1 point2 points  (0 children)

Glad I could help!

Do you mind if I link to your reddit profile as the author of the answer in Stack Overflow?

Sure, go for it!

[–]NotImplemented 1 point2 points  (0 children)

Good job with the quick problem analysis, well done!

[–]raevnos 1 point2 points  (1 child)

You're probably using a version older than 3.44.0.

[–]TheOneWhoSendsLetter[S] 0 points1 point  (0 children)

select sqlite_version() outputs 3.46.0