Skip to content

Latest package versions in requirement.txt causing code to crash #77

Description

@notJmes

I encountered this issue while running on both python 3.8 and python 3.13. The errors are likely caused by the latest versions of the packages below:

  • netaddr
  • pillow
Exception in thread Thread-3 (PcapEngine):
Traceback (most recent call last):
  File "/usr/lib/python3.12/threading.py", line 1073, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.12/threading.py", line 1010, in run
    self._target(*self._args, **self._kwargs)
  File "/home/notjmes/Desktop/pcapxray/PcapXray/Source/Module/pcap_reader.py", line 86, in __init__
    self.analyse_packet_data()
  File "/home/notjmes/Desktop/pcapxray/PcapXray/Source/Module/pcap_reader.py", line 131, in analyse_packet_data
    private_source = IPAddress(packet[IP].src).is_private()
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'IPAddress' object has no attribute 'is_private'

The error came from the latest version of netaddr from requirements.txt. Worked around it by manually pip installing netaddr==0.7.19.

Had another issue where clicking on "Visualize" throws:

Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/lib/python3.8/tkinter/__init__.py", line 1895, in __call__
    return self.func(*args)
  File "/home/notjmes/Desktop/pcapxray/PcapXray/Source/Module/user_interface.py", line 333, in map_select
    self.generate_graph()
  File "/home/notjmes/Desktop/pcapxray/PcapXray/Source/Module/user_interface.py", line 307, in generate_graph
    self.load_image()
  File "/home/notjmes/Desktop/pcapxray/PcapXray/Source/Module/user_interface.py", line 319, in load_image
    self.img = ImageTk.PhotoImage(Image.open(self.image_file).resize(tuple(self.zoom),Image.ANTIALIAS))#.convert('RGB'))
AttributeError: module 'PIL.Image' has no attribute 'ANTIALIAS'

Which was also solved by manually pip installing pillow==8.4.0. The software works great after. Many thanks for this repo!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions