Closed
Description
Describe the bug
When I try to execute the test program text_extractor.py
I get the following error message:
Traceback (most recent call last):
File "~/PyPCAPKit/test/test_extractor.py", line 5, in <module>
plist = pcapkit.extract(fin='../sample/in.pcap', fout='../sample/out.plist', format='plist')
TypeError: 'prec' is an invalid keyword argument for this function
System information
A clear and concise description of your system information.
- OS Version: Ubuntu 20.04.5 LTS
- Python Version: Python 3.10.11
- Python Implementation: CPython
Traceback stack
~/pcapkit/__init__.py:0: DevModeWarning: development mode enabled
PCAPKIT_DEVMODE=true
Traceback (most recent call last):
File "~/PyPCAPKit/test/test_extractor.py", line 5, in <module>
plist = pcapkit.extract(fin='../sample/in.pcap', fout='../sample/out.plist', format='plist')
File "~/PyPCAPKit/pcapkit/interface/core.py", line 117, in extract
return Extractor(fin=fin, fout=fout, format=format,
File "~/PyPCAPKit/pcapkit/foundation/extraction.py", line 635, in __init__
self.run() # start extraction
File "~/PyPCAPKit/pcapkit/foundation/extraction.py", line 342, in run
self.record_frames()
File "~/PyPCAPKit/pcapkit/foundation/extraction.py", line 490, in record_frames
self._exeng.read_frame()
File "~/PyPCAPKit/pcapkit/foundation/engines/pcap.py", line 139, in read_frame
frame = Frame(ext._ifile, num=ext._frnum+1, header=self._gbhdr.info,
File "~/PyPCAPKit/pcapkit/protocols/protocol.py", line 497, in __init__
self.__post_init__(file, length, **kwargs) # type: ignore[arg-type]
File "~/PyPCAPKit/pcapkit/protocols/misc/pcap/frame.py", line 349, in __post_init__
self._info = self.unpack(length, _read=_read, **kwargs)
File "~/PyPCAPKit/pcapkit/protocols/misc/pcap/frame.py", line 191, in unpack
return self.read(length, **kwargs)
File "~/PyPCAPKit/pcapkit/protocols/misc/pcap/frame.py", line 212, in read
with decimal.localcontext(prec=64):
TypeError: 'prec' is an invalid keyword argument for this function
Expected behavior
The program should run correctly and generate the out.plist
file.
Additional context
Add any other context about the problem here.
Metadata
Metadata
Assignees
Labels
No labels