在python3中格式化sql文件时出现KeyError

时间:2019-07-09 09:40:43

标签: python-3.x

我有一个包含XML和一些SQL的文本文件,并试图做一个简单的字符串格式,但是出现以下错误 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project PROJECT_NAME: Compilation failure: Compilation failure: [ERROR] /C:/Users/xxxx/dir/APP_NAME/src/main/java/api/request/UpdateDownload.java:[6,34] package com.victorlaerte.asynctask does not exist [ERROR] /C:/Users/xxxx/dir/APP_NAME/src/main/java/api/request/UpdateDownload.java:[18,37] cannot find symbol [ERROR] symbol: class AsyncTask [ERROR] /C:/Users/xxxx/dir/APP_NAME/src/main/java/api/request/LicenseCheckStatus.java:[5,34] package com.victorlaerte.asynctask does not exist [ERROR] /C:/Users/xxxx/dir/APP_NAME/src/main/java/api/request/LicenseCheckStatus.java:[17,41] cannot find symbol [ERROR] symbol: class AsyncTask [ERROR] /C:/Users/xxxx/dir/APP_NAME/src/main/java/controller/PreloaderWindowController.java:[4,34] package com.victorlaerte.asynctask does not exist [ERROR] /C:/Users/xxxx/dir/APP_NAME/src/main/java/api/request/LicenseRegister.java:[7,34] package com.victorlaerte.asynctask does not exist [ERROR] /C:/Users/xxxx/dir/APP_NAME/src/main/java/api/request/LicenseRegister.java:[19,38] cannot find symbol

KeyError: '00000000-0000-0000-0000-000000000000'

该sql文件具有以下内容:

import os
query = open(("layer.sql"), "r").read()
crs=10
db_nam='test'
db_sql = query.format(CRS=crs, DATABASE=db_name)

0 个答案:

没有答案