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

dont support all the Chinese character in the sql file #50

Open
zhangzuolin16 opened this issue Sep 21, 2023 · 0 comments
Open

dont support all the Chinese character in the sql file #50

zhangzuolin16 opened this issue Sep 21, 2023 · 0 comments

Comments

@zhangzuolin16
Copy link

dears,

there is a bug to exeucte a sql file by databricks-sql-cli when the sql file contiains some Chinese character.
for example:
those two sql file: test.zip

the test1.sql will be execute success, but the test2.sql will be failed to execute,

the error message as below:
Traceback (most recent call last):
File "C:\Program Files\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Program Files\Python310\lib\runpy.py", line 86, in run_code
exec(code, run_globals)
File "C:\Program Files\Python310\Scripts\dbsqlcli.exe_main
.py", line 7, in
File "C:\Program Files\Python310\lib\site-packages\click\core.py", line 1130, in call
return self.main(*args, **kwargs)
File "C:\Program Files\Python310\lib\site-packages\click\core.py", line 1055, in main
rv = self.invoke(ctx)
File "C:\Program Files\Python310\lib\site-packages\click\core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Program Files\Python310\lib\site-packages\click\core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "C:\Program Files\Python310\lib\site-packages\dbsqlcli\main.py", line 735, in cli
query = f.read()
File "C:\Program Files\Python310\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x90 in position 18: character maps to

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant