pkumza / LibRadar

LibRadar - A detecting tool for 3rd-party libraries in Android apps.
Apache License 2.0
256 stars 51 forks source link

'int' object has no attribute 'iteritems' #64

Closed jooneyp closed 5 years ago

jooneyp commented 5 years ago

I downloaded database and configured right, LiteRadar works like a charm but LibRadar is not working for me.

Python version : 2.7.5

Here is my Traceback :

Traceback (most recent call last):
  File "LibRadar/libradar.py", line 232, in <module>
    res = lrd.compare()
  File "LibRadar/libradar.py", line 220, in compare
    self.tree.get_repackage_main(res, self.hex_sha256)
  File "/opt/LibRadar/LibRadar/dex_tree.py", line 411, in get_repackage_main
    self.db_rep.zadd("apk_weight", ret_length, hex_sha256 )
  File "/usr/lib/python2.7/site-packages/redis/client.py", line 2320, in zadd
    for pair in iteritems(mapping):
  File "/usr/lib/python2.7/site-packages/redis/_compat.py", line 81, in iteritems
    return x.iteritems()
AttributeError: 'int' object has no attribute 'iteritems'
avahidi commented 5 years ago

This problem seems to go away if you use the correct version of the redis python client:

pip install redis==2.10.5

(I am using redis server 5.0.x, not sure what happens if you use the one suggested by the author)

jooneyp commented 5 years ago

@avahidi Thanks, that solved the problem!

ThrawnCA commented 3 years ago

Just to note, we ran into this because we installed the harvest extension, which defines redis>=3.3.0 in its requirements. Fixed in the latest Harvest version 1.3.1, but that's only 3 days old and I haven't tested how well it works with CKAN 2.8.