诡异的python文件
十分诡异
我有以下文件,放在文件夹A下执行 (Python.exe, VS code, jupyter notebook),第三行报错,找不到 TrieAPI.
如果把该文件放到其他文件夹下,可以完美执行。真的是太诡异了。。。弄了2个小时。。。
import clr
clr.AddReference(r"C:Users×××××××××AITrieTree.dll")
from TrieTree import TrieAPI
api = TrieAPI()
filePath = r"C:Users×××××××AI×××××××Part2BHAPerformanceid_bha_word.csv";
trie = api.CreateTree(filePath)
targetString = "OOGMMNLNQOQ"
a = trie.SearchTrie(targetString, 67)
word = a.Item1
ids = a.Item2
num = 1
for id in ids:
print("{2}# Related BHA:{0} {1}".format(id, 0, num))
num +=1