Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/sqlite/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
我试图提取值并将它们放在.db中以供以后使用,但是我的代码出现了错误,我甚至无法再加载SQLite_Sqlite_Ironpython_Revitpythonshell - Fatal编程技术网

我试图提取值并将它们放在.db中以供以后使用,但是我的代码出现了错误,我甚至无法再加载SQLite

我试图提取值并将它们放在.db中以供以后使用,但是我的代码出现了错误,我甚至无法再加载SQLite,sqlite,ironpython,revitpythonshell,Sqlite,Ironpython,Revitpythonshell,使用: -铁蟒 -欧特克 -Revit(PyRevit) -Revit API -SQLite3 我的代码如下: try: conn = sqlite3.connect('SQLite_Python.db') c = conn.cursor() print("connected") Insert_Volume = """INSERT INTO Column_Coordinates (x, y, z) VALUES (1, 2, 3)""" count = c.e

使用: -铁蟒 -欧特克 -Revit(PyRevit) -Revit API -SQLite3

我的代码如下:

try:
    conn = sqlite3.connect('SQLite_Python.db')
    c = conn.cursor()
    print("connected")

    Insert_Volume = """INSERT INTO Column_Coordinates
(x, y, z)
VALUES
(1, 2, 3)"""
count = c.execute(Insert_Volume)
    conn.commit()
    print("Volume values inserted", c.rowcount)
    c.close()

except sqlite3.Error as error:
    print("Failed to insert data into sqlite table", error)
finally:
    if (conn):
        conn.close()
        print("The SQLite connection is closed")'''
此代码过去在PyRevit中工作,但现在不工作,出现以下错误:

Exception:System.IO.IOException:无法添加对程序集IronPython.SQLite的引用

请告知,这是一个大型项目的早期步骤之一,因此耽误了我的工作相当多


我期待您的回复。

您的
导入声明是什么?为快速回复干杯。我的导入语句如下:
import clr import sqlite3
显然,我无法在回复中开始新行,但两个语句都在单独的行上。似乎错误是由
import sqlite3
import语句引发的(值得更新您的问题以包括所有开销语句)。经过一番挖掘,我进一步了解了它,但从IronPython导入sqlite3包似乎有问题