UnicodeDecodeError:“ascii”编解码器无法在位置1解码字节0xbe

2024-09-29 01:30:53 发布

您现在位置:Python中文网/ 问答频道 /正文

我尝试在cmd中运行文件时出错。当我在eclipse中运行它时,它是有效的。搞不清问题出在哪里。。 你能给我个建议吗?在

getConnection
__init__
initialize
Traceback (most recent call last):
  File "D:\workspace\AproximateSearchPython2\Search.py", line 60, in <module>
    main()
  File "D:\workspace\AproximateSearchPython2\Search.py", line 57, in main
    search("weight")
  File "D:\workspace\AproximateSearchPython2\Search.py", line 24, in search
    levenshteinResults=SC.findMatchesByLevenshteinDistance(pattern) # Pre vstupy do 12 znakov
  File "D:\workspace\AproximateSearchPython2\SearchClass.py", line 39, in findMatchesByLevenshteinDistance
    levResults=list(automata.find_all_matches(pattern, k, matcher))
  File "D:\workspace\AproximateSearchPython2\automata.py", line 182, in find_all_matches
    next = lookup_func(match)
  File "D:\workspace\AproximateSearchPython2\automata.py", line 203, in __call__
    pos = bisect.bisect_left(self.l, w)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xbe in position 1: ordinal not in range(128)

Tags: inpysearchmainlineallfindcall