qpython-android / qpython.org

QPython contributor & sugguestion & question homepage
http://qpython.org
58 stars 11 forks source link

Error while importing scapy #212

Closed MordochayK closed 3 years ago

MordochayK commented 3 years ago

I installed scapy by qpypi but when I import it I get this error: from scapy.all import IP File "/data/user/0/org.qpython.qpy3/files/lib/python3.6/site-packages/scapy/all.py", line 28, in from scapy.sendrecv import * File "/data/user/0/org.qpython.qpy3/files/lib/python3.6/site-packages/scapy/sendrecv.py", line 522, in sr_func.doc += _DOC_SNDRCV_PARAMS TypeError: unsupported operand type(s) for +=: 'NoneType' and 'str'

The code in the package installed is:

  1. Append doc

  2. for sr_func in [srp, srp1, sr, sr1]:
  3. sr_func.doc += _DOC_SNDRCV_PARAMS

But the code from master branch in scapy repository is 581 # Append doc 582 for sr_func in [srp, srp1, sr, sr1]: 583 if sr_func.doc is not None: 584 sr_func.doc += _DOC_SNDRCV_PARAMS

So I think all I need is to get the last version.

MordochayK commented 3 years ago

I reinstalled scapy and it solved it