Open BMWE opened 3 years ago
same err!
same err!
seems that the package in pypi is not updated one. I've downloaded the src from github and compared with pypi. After updating the files, it seems to work fine.
@KimiNewt , I think that you have to update the pypi with the updated package.
But I have another problem after updating
File "C:\Users\asus\AppData\Local\Programs\Python\Python36\lib\site-packages\pyshark-0.4.2.11-py3.6.egg\pyshark\tshark\tshark_xml.py", line 26, in packet_from_xml_packet
xml_pkt = lxml.objectify.fromstring(xml_pkt, parser)
File "src\lxml\objectify.pyx", line 1802, in lxml.objectify.fromstring
File "src\lxml\etree.pyx", line 3211, in lxml.etree.fromstring
File "src\lxml\parser.pxi", line 1877, in lxml.etree._parseMemoryDocument
File "src\lxml\parser.pxi", line 1765, in lxml.etree._parseDoc
File "src\lxml\parser.pxi", line 1127, in lxml.etree._BaseParser._parseDoc
File "src\lxml\parser.pxi", line 601, in lxml.etree._ParserContext._handleParseResultDoc
File "src\lxml\parser.pxi", line 711, in lxml.etree._handleParseResult
File "src\lxml\parser.pxi", line 640, in lxml.etree._raiseParseError
File "<string>", line 146
lxml.etree.XMLSyntaxError: Input is not proper UTF-8, indicate encoding !
Bytes: 0xE4 0x22 0x20 0x73, line 146, column 265
lxml.etree.XMLSyntaxError: Input is not proper UTF-8, indicate encoding !
It seems to be the problem, that the incoming data (in XML format) is not encoded the right way and pyshark does not cast to 'UTF-8'. While debugging it posed that it appeared to be in 'latin-1'. added following line between line 26 + 27 in src\pyshark\tshark\tshark_xml.py:
xml_pkt = xml_pkt.decode('latin-1')
It worked.
Looks to be a duplicate of issue #116. Created pull request #479 for a fix.
I'm having wireshark 3.4.2.
And I have following error: