我在試用AlchemyAPI_Python-0.6 - PyXml模塊。我試圖運行它的關鍵字提取器功能,但嘗試編譯時出現以下錯誤。我使用了示例中給出的keywords.py文件。我複製了python目錄下的所有文件(AlchemyAPI.py,keywords.py,api_key.txt)。編譯時AlchemyAPI給出錯誤
Traceback (most recent call last):
File "C:\Python26\keywords.py", line 4, in <module>
import AlchemyAPI
File "C:\Python26\AlchemyAPI.py", line 6, in <module>
from xml import xpath
File "C:\Python26\lib\site-packages\_xmlplus\xpath\__init__.py", line 112, in <module>
from pyxpath import ExprParserFactory
File "C:\Python26\lib\site-packages\_xmlplus\xpath\pyxpath.py", line 59, in <module>
from xml.xpath.ParsedAbbreviatedRelativeLocationPath import ParsedAbbreviatedRelativeLocationPath
File "C:\Python26\lib\site-packages\_xmlplus\xpath\ParsedAbbreviatedRelativeLocationPath.py", line 31
as = ParsedAxisSpecifier.ParsedAxisSpecifier('descendant-or-self')
^
SyntaxError: invalid syntax
有人能幫我解決這個問題嗎?
預先感謝您!