元素树错误,prestashop openerp connector modu

2024-09-27 19:16:49 发布

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

我正在使用prestashop-openerp连接器launchpad site

可以安装所有东西,没有错误,但当我尝试使用远程prestashop网站界面connect时,它会抛出以下错误:

ParseError: mismatched tag: line 13, column 2

以及服务器回溯:

^{pr2}$

我找了一些答案,看到这个question here on SO,但还是没有线索。在

如果这实际上是模块的错误,或者是prestapyt库的问题,我真的不知道,或者可能是我的预发布安装中的某个xml的错误。在

有人用过这个模块,或者有什么线索吗?在

提前谢谢!在

编辑

这是一个过时的pretapy版本,现在我有了最后一个版本,回溯错误更加明显:

  parsed_content = super(PrestaShopWebServiceDict, self)._parse(content)
  File "/usr/local/lib/python2.7/dist-packages/prestapyt-0.6.0-py2.7.egg/prestapyt/prestapyt.py", line 214, in _parse
raise PrestaShopWebServiceError('HTTP XML response is not parsable : %s. %s' % (e, content[:512]))
  PrestaShopWebServiceError: 'HTTP XML response is not parsable : mismatched tag: line 13, column 2. <HTML>\n<HEAD>\n<TITLE>404 Not Found</TITLE>\n</HEAD>\n<BODY>\n<H1>Not Found</H1>\nThe requested document was not found on this server.\n<P>\n<HR>\n<ADDRESS>\nWeb Server at taxco.com.ve\n</ADDRESS>\n</BODY>\n</HTML>\n\n<!--\n   - Unfortunately, Microsoft has added a clever new\n   - "feature" to Internet Explorer. If the text of\n   - an error\'s message is "too small", specifically\n   - less than 512 bytes, Internet Explorer returns\n   - its own error message. You can turn that off,\n   - but it\'s pretty tricky to find switch'

这是一个404错误,但我不知道应该在那里添加哪个文件,有实现这个连接器的经验的人?在


Tags: 模块版本parseisontag错误line
1条回答
网友
1楼 · 发布于 2024-09-27 19:16:49

您已经(几乎)掌握了错误消息和回溯中的所有线索:prestapit得到了一些格式错误/损坏的XML。缺少的线索是:哪个url返回格式不正确的XML,这个损坏的XML是什么样子。在

如果你看一下你的回溯,你可以在一个明显的地方找到网址和回复:

File "/usr/prestaconnect/prestashoperpconnect/src/prestapyt/prestapyt/prestapyt.py", line 375, in get_with_url
r = self._execute(url, 'GET')
File "/usr/prestaconnect/prestashoperpconnect/src/prestapyt/prestapyt/prestapyt.py", line 206, in _execute
self._check_status_code(r.status_code, r.content)

所以从第行开始=~205/usr/prestaconnect/prestashoperpconnect/src/prestaptyt/prestapyt/预适应.py您可以打印或记录url和响应以供检查,或者只添加一个断点以进入调试器(如果显然不是在守护程序模式下运行的话)。在

相关问题 更多 >

    热门问题