SourceLeakHacker icon indicating copy to clipboard operation
SourceLeakHacker copied to clipboard

ImportError: No module named context

Open zbmcz opened this issue 5 years ago • 7 comments

git clone https://github.com/WangYihang/SourceLeakHacker.git
cd SourceLeakHacker
pip install -r requirments.txt
python SourceLeakHacker.py --url=http://server:port/ --threads=4 --timeout=8 

之后出现:

Traceback (most recent call last):
  File "SourceLeakHacker.py", line 16, in <module>
    from lib.util import output
  File "/Users/boming/Downloads/SourceLeakHacker-3.0/lib/util/output.py", line 7, in <module>
    from lib.context import context
ImportError: No module named context

是我的环境问题吗

zbmcz avatar May 13 '20 10:05 zbmcz

我这边 Python3 测试没问题,你是不是 Python2?(有可能是我没来得及在 2 下测试,如果方便的话先用 3 试试)

WangYihang avatar May 14 '20 10:05 WangYihang

Python3 没问题,多谢,之前的环境是mac os,看来我要好好学习一下Python了。

zbmcz avatar May 26 '20 13:05 zbmcz

@zbmcz 好嘞!俺这边 Python2 再测试一下,争取俩版本都能无缝使用。多谢反馈!

WangYihang avatar May 27 '20 01:05 WangYihang

Python3也无法使用,

Traceback (most recent call last):
  File "SourceLeakHacker.py", line 11, in <module>
    import prettytable
  File "/home/test/.local/lib/python3.5/site-packages/prettytable/__init__.py", line 3, in <module>
    from .prettytable import (
  File "/home/test/.local/lib/python3.5/site-packages/prettytable/prettytable.py", line 250
    raise Exception(f"Index {index} is invalid, must be an integer or slice")
                                                                           ^
SyntaxError: invalid syntax

snow212-cn avatar Nov 18 '20 14:11 snow212-cn

I am seeing a similar error image

xaeroborg avatar Jan 02 '22 18:01 xaeroborg

@xaeroborg xaeroborg, Python 2.7 is not supported, please use python 3.6+. It works on Python 3.8.10; Ubuntu 20.04.3 LTSat least.

WangYihang avatar Jan 03 '22 02:01 WangYihang

@WangYihang It works great thanks a ton for the prompt response and Happy New Year

xaeroborg avatar Jan 03 '22 03:01 xaeroborg