Srinivas11789 / PcapXray

:snowflake: PcapXray - A Network Forensics Tool - To visualize a Packet Capture offline as a Network Diagram including device identification, highlight important communication and file extraction
GNU General Public License v2.0
1.66k stars 276 forks source link

startup error #12

Open dac4755 opened 6 years ago

dac4755 commented 6 years ago

Hi.

This looks really cool but I get this error on a fresh install:

 (master *) Source $ python main.py 
Traceback (most recent call last):
  File "main.py", line 12, in <module>
    import userInterface
  File "Module/userInterface.py", line 11, in <module>
    from PIL import Image,ImageTk
ImportError: cannot import name ImageTk

I'm running on ubuntu (I also get the same error on Fedora 26). The PIL package doesn't have ImageTK. Is there a certain version I need?

 (master *) Source $ python --version
Python 2.7.14
(master *) Source $ python
Python 2.7.14 (default, Sep 23 2017, 22:06:14) 
[GCC 7.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import PIL
>>> help(PIL)
Help on package PIL:

NAME
    PIL

FILE
    /usr/lib/python2.7/dist-packages/PIL/__init__.py

DESCRIPTION
    # The Python Imaging Library.
    # $Id$
    #
    # package placeholder
    #
    # Copyright (c) 1999 by Secret Labs AB.
    #
    # See the README file for information on usage and redistribution.
    #

PACKAGE CONTENTS
    BdfFontFile
    BmpImagePlugin
    BufrStubImagePlugin
    ContainerIO
    CurImagePlugin
    DcxImagePlugin
    DdsImagePlugin
    EpsImagePlugin
    ExifTags
    FitsStubImagePlugin
    FliImagePlugin
    FontFile
    FpxImagePlugin
    FtexImagePlugin
    GbrImagePlugin
    GdImageFile
    GifImagePlugin
    GimpGradientFile
    GimpPaletteFile
    GribStubImagePlugin
    Hdf5StubImagePlugin
    IcnsImagePlugin
    IcoImagePlugin
    ImImagePlugin
    Image
    ImageChops
    ImageCms
    ImageColor
    ImageDraw
    ImageDraw2
    ImageEnhance
    ImageFile
    ImageFilter
    ImageFont
    ImageGrab
    ImageMath
    ImageMode
    ImageMorph
    ImageOps
    ImagePalette
    ImagePath
    ImageQt
    ImageSequence
    ImageShow
    ImageStat
    ImageTransform
    ImageWin
    ImtImagePlugin
    IptcImagePlugin
    Jpeg2KImagePlugin
    JpegImagePlugin
    JpegPresets
    McIdasImagePlugin
    MicImagePlugin
    MpegImagePlugin
    MpoImagePlugin
    MspImagePlugin
    OleFileIO
    PSDraw
    PaletteFile
    PalmImagePlugin
    PcdImagePlugin
    PcfFontFile
    PcxImagePlugin
    PdfImagePlugin
    PixarImagePlugin
    PngImagePlugin
    PpmImagePlugin
    PsdImagePlugin
    PyAccess
    SgiImagePlugin
    SpiderImagePlugin
    SunImagePlugin
    TarIO
    TgaImagePlugin
    TiffImagePlugin
    TiffTags
    WalImageFile
    WebPImagePlugin
    WmfImagePlugin
    XVThumbImagePlugin
    XbmImagePlugin
    XpmImagePlugin
    _binary
    _imaging
    _imagingcms
    _imagingft
    _imagingmath
    _imagingmorph
    _tkinter_finder
    _util
    _webp
    features

DATA
    PILLOW_VERSION = '4.1.1'
    VERSION = '1.1.7'
    __version__ = '4.1.1'

VERSION
    4.1.1

(END)
Srinivas11789 commented 6 years ago

Hi @dac4755, Thanks for reporting the issue. I think the work around would be to install imagetk separately, sudo apt-get install python-imaging-tk Please try and let me know if this works. I would investigate further on this issue to figure out if this would be required as a separate entity.

dac4755 commented 6 years ago

Thanks, that did the trick! I think the problem was primarily on my end with some corrupted packages causing conflicts. I removed the offending packages, installed the one you recommended, and now it runs. Thanks for your help and quick response!

David

bahaahassanieh commented 6 years ago

cant find any module named userInterface , is there a specific package

aki2419 commented 5 years ago

root@blackout:~/Desktop/PcapXray/Source# python main.py Traceback (most recent call last): File "main.py", line 12, in import userInterface File "Module/userInterface.py", line 5, in import plotLanNetwork File "Module/plotLanNetwork.py", line 9, in import matplotlib.pyplot as plt File "/usr/lib/python2.7/dist-packages/matplotlib/init.py", line 124, in from . import cbook ImportError: cannot import name cbook

I am using Kali Linux... THanks

Srinivas11789 commented 5 years ago

Thanks for the issues. I have some startup fixes pending to merge soon.

@bahaahassanieh - I think the current version of the project requires you to be in the source folder where main.py resides before you can run python main.py. Let me know if this solves the issue. This issue is already fixed due to be merged #7.

@aki2419 - The cbook error is related to the matplotlib library installation. I think the work around here would solve it. I think I should update the requirements file to a specific matplotlib version to solve this. This says matplotlib=2.0.2 fixes the cbook error. I will investigate further and try fixing this from my end but let me know if this still persists.

Also, this seems to get fixed with a python virtualenv setup.

pip install virtualenv
virtualenv <name>
source <name>/bin/activate
pip install -r requirements.txt