1、atom-beautify sqlparse中文乱码
atom-beautify底层调用Python3,故需设置默认编码为UTF-8
解决办法:添加以下系统变量
- 参数:PYTHONIOENCODING
- 值:UTF-8
2、 Could not find ‘sqlformat’. The program may not be installed.
https://github.com/andialbrecht/sqlparse
解决方法:使用文件搜索工具查找sqlformat.exe路径,添加到环境变量中,以下路径供参考:
C:\Users\***\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\Scripts
Could not find 'sqlformat'. The program may not be installed.
See sqlformat installation instructions at https://github.com/Glavin001/atom-beautify#beautifiers or go to https://github.com/andialbrecht/sqlparse
Your program is properly installed if running 'where.exe sqlformat' in your CMD prompt returns an absolute path to the executable.
Hide Stack Trace
Error: Could not find 'sqlformat'. The program may not be installed.
at Function.Executable.commandNotFoundError (file:///C:/Users/liguangliang/.atom/packages/atom-beautify/src/beautifiers/executable.coffee:277:10)
at HybridExecutable.Executable.commandNotFoundError (file:///C:/Users/liguangliang/.atom/packages/atom-beautify/src/beautifiers/executable.coffee:269:18)
at file:///C:/Users/liguangliang/.atom/packages/atom-beautify/src/beautifiers/executable.coffee:197:22
at tryCatcher (C:\Users\liguangliang\.atom\packages\atom-beautify\node_modules\bluebird\js\release\util.js:16:23)
at Promise._settlePromiseFromHandler (C:\Users\liguangliang\.atom\packages\atom-beautify\node_modules\bluebird\js\release\promise.js:547:31)
at Promise._settlePromise (C:\Users\liguangliang\.atom\packages\atom-beautify\node_modules\bluebird\js\release\promise.js:604:18)
at Promise._settlePromise0 (C:\Users\liguangliang\.atom\packages\atom-beautify\node_modules\bluebird\js\release\promise.js:649:10)
at Promise._settlePromises (C:\Users\liguangliang\.atom\packages\atom-beautify\node_modules\bluebird\js\release\promise.js:725:18)
at _drainQueueStep (C:\Users\liguangliang\.atom\packages\atom-beautify\node_modules\bluebird\js\release\async.js:93:12)
at _drainQueue (C:\Users\liguangliang\.atom\packages\atom-beautify\node_modules\bluebird\js\release\async.js:86:9)
at Async._drainQueues (C:\Users\liguangliang\.atom\packages\atom-beautify\node_modules\bluebird\js\release\async.js:102:5)
at Async.drainQueues (C:\Users\liguangliang\.atom\packages\atom-beautify\node_modules\bluebird\js\release\async.js:15:14)
at processTicksAndRejections (internal/process/task_queue