Replaced urllib2 with requests to achieve Python3 support#2
Replaced urllib2 with requests to achieve Python3 support#2FrankTheDevop wants to merge 1 commit intoSkyBiometry:masterfrom
Conversation
|
I used this version of the client library, and I keep getting error code 31 (download error file not found). I'm not sure what to do about this .. I'm using the same images given in the README |
|
@vijpandaturtle I only published my changes to be able to use it with Python3 but I can try to help you. |
|
Thank you # Detecting faces
from face_client.face_client import FaceClient
# Initializing the face recognition client
client = FaceClient(API_KEY, API_SECRET)
response = client.faces_detect('http://savasplace.com/wp-content/uploads/2009/04/guido-van-rossum.jpg, http://farm1.static.flickr.com/43/104506247_c748f20b83.jpg, http://farm1.static.flickr.com/67/200126290_2798330e61.jpg')
tids = [photo['tags'][0]['tid'] for photo in response['photos']]
tids
# Saving tags for training namespace index
client.tags_save(tids= ','.join(tids), uid= 'guido@CoBo', label='Guido Van Rossum')
clients.faces_train('guido@CoBo')
client.tags_get('guido@CoBo')
client.faces_recognize('all', 'http://farm1.static.flickr.com/41/104498903_bad315cee0.jpg', namespace='CoBo')(My api key and api secret is left blank because they are private) |
|
@vijpandaturtle I tried your code and I think I found the problem. In |
|
Thank you that fixed the error for me :) |
|
@FrankTheDevop I have tried running your script with python 3.6.4, however it uses dict.iteritems() which is no longer supported in Python 3. Using dict.items() seems to do the trick. Also there is urllib.parse import which is Python 3 package, so its impossible to run this script in neither py3 or py2. |

Just a quick hack to be able to use your library with python3.
Let me know if you miss something