Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

运行错误请问什么原因? #1

Open
scholar1989 opened this issue Jul 5, 2016 · 2 comments
Open

运行错误请问什么原因? #1

scholar1989 opened this issue Jul 5, 2016 · 2 comments

Comments

@scholar1989
Copy link

Traceback (most recent call last):
File "C:\Users\schol\documents\visual studio 2015\Projects\PythonApplication2\PythonApplication2\PythonApplication2.py", line 16, in
result = bbsExtra.extract(doc) # 调用extract方法提取所需内容
File "C:\Users\schol\documents\visual studio 2015\Projects\PythonApplication2\PythonApplication2\gooseeker.py", line 44, in extract
transform = etree.XSLT(xslt_root)
File "xslt.pxi", line 412, in lxml.etree.XSLT.init (src\lxml\lxml.etree.c:173326)
lxml.etree.XSLTParseError: Cannot parse stylesheet
Press any key to continue . . .

@gz51837844
Copy link
Collaborator

是无效的xslt引起的

@ipfono
Copy link
Collaborator

ipfono commented Jul 5, 2016

尝试在代码中加上 print(bbsExtra.getXslt()) 打印一下返回的XSLT 内容,看看是否正确。XSLT获取方式是直接变量赋值还是API 获取呢?若为API 获取,需要检查一下参数是否正确。
检查方式:可直接访问API入口网址(加上参数)看看是否能返回正确的xslt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants