0

I am trying to use geodis from here : https://github.com/doat/geodis

I downloaded redis as explained in their website and here : ImportError: No module named redis

Now when I do the following as explained in the geodis website I get the error: no module named redis.

dn525f4i:src hmi$ ./geodis.py -l  40.90732,-74.07514
Traceback (most recent call last):
  File "./geodis.py", line 29, in <module>
    import redis
ImportError: No module named redis

But when I do the following

dn525f4i:src hmi$ python geodis.py  40.90732,-74.07514
Success!

I get the above "Success!" but it should idea be like following :

$ ./geodis.py -l  40.90732,-74.07514
Location: {'name': 'Rochelle Park', 'country': 'United States', 'lon': '-74.07514', 'zipcode': '', 'state': 'New Jersey', 'key': 'loc:rochelle park:united states:new jersey:', 'lat': '40.90732'}

Any idea on what I am doing wrong? Thanks!

Community
  • 1
  • 1
hi15
  • 2,113
  • 6
  • 28
  • 51
  • hey dude, I know this is an old question and not sure if you ever got it to work, I discovered the version 2.0.9 is working. – Ciasto piekarz Sep 21 '17 at 09:35

1 Answers1

1

When you type ./geodis.py, you are executing the python called out in the first (shebang) line in geodis.py.

I suspect the python called in the python geodis.py call is different from the one in the shebang line.

Also when you do python geodis.py ..., you didn't specify the -l option - that might account for the different output.

vikramls
  • 1,802
  • 1
  • 11
  • 15
  • It gives error too. dn525f4i:src hmi$ python geodis.py -1 40.90732,-74.07514 Usage: geodis.py [--import_geonames | --import_ip2location] -- file=FILE geodis.py: error: no such option: -1 – hi15 Nov 07 '14 at 23:45
  • Can you try geodis.py -l (letter l, not 1). – vikramls Nov 08 '14 at 00:34