Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-1451

not retreve the encoded data as it is which i m inserted....

    • Type: Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.4
    • Component/s: Auth, JSON
    • Environment:
      operating system-- linux 16.04
    • 10

      m using face_recognition library of python in which it convert the image into the encoded form..the encoded image look like below---

      ("my output is", [-0.0810571 0.07765304 -0.01207364 -0.07887193 -0.10862262 0.00894677
      0.02332557 -0.13491267 0.17760251 -0.05169698 0.14168473 -0.02124487
      -0.18840104 -0.00166624 -0.04524321 0.05642941 -0.20851628 -0.11587431
      -0.06982738 -0.09224549 0.07435957 0.05051775 -0.00907151 0.06328857
      -0.21342427 -0.28789386 -0.16309851 -0.0865657 0.15885921 -0.1180099
      -0.02833412 0.05563367 -0.20987368 -0.08260232 0.01715455 0.03688456
      -0.0463421 -0.07057426 0.19063213 0.06713615 -0.15279283 0.05829819
      0.08128895 0.29696086 0.22681116 0.09677196 -0.02023378 -0.0361901
      0.09358779 -0.23957716 0.15015952 0.13825837 0.00492278 0.06615157
      0.1174949 -0.17725426 -0.03603006 0.03409255 -0.1879885 0.03505005
      0.04937597 0.00329883 -0.01896965 -0.00677846 0.0996637 0.10273074
      -0.03806393 -0.14637196 0.15648144 -0.23035409 -0.05747294 0.03025337
      -0.0691918 -0.11424079 -0.28547999 0.05400954 0.4612399 0.20551455
      -0.1205992 0.10039085 -0.02485273 -0.08657033 0.15424132 0.02397859
      -0.10445568 0.06970545 -0.08628456 0.10466914 0.15395048 0.03581595
      -0.06539053 0.2473422 0.02394313 0.01033761 0.12121034 0.07658306
      -0.15766957 -0.04047695 -0.17851622 -0.08721714 0.14192414 0.04055045
      0.01483513 0.19600785 -0.14814621 0.20973045 0.02028378 -0.06801224
      -0.08009423 -0.02115281 -0.14955129 0.01807878 0.1297669 -0.2507216
      0.11424468 0.11775573 -0.05532342 0.11031963 0.10643894 -0.02885438
      0.03168463 -0.0032694 -0.15598211 -0.09769975 0.07611469 -0.02105711
      0.09928153 0.03357534])

      then i save this encoding to the mongo database but when i want this encoding back it look like below

      ("my output is", '[-0.0810571 0.07765304 -0.01207364 -0.07887193 -0.10862262 0.00894677\n 0.02332557 -0.13491267 0.17760251 -0.05169698 0.14168473 -0.02124487\n -0.18840104 -0.00166624 -0.04524321 0.05642941 -0.20851628 -0.11587431\n -0.06982738 -0.09224549 0.07435957 0.05051775 -0.00907151 0.06328857\n -0.21342427 -0.28789386 -0.16309851 -0.0865657 0.15885921 -0.1180099\n -0.02833412 0.05563367 -0.20987368 -0.08260232 0.01715455 0.03688456\n -0.0463421 -0.07057426 0.19063213 0.06713615 -0.15279283 0.05829819\n 0.08128895 0.29696086 0.22681116 0.09677196 -0.02023378 -0.0361901\n 0.09358779 -0.23957716 0.15015952 0.13825837 0.00492278 0.06615157\n 0.1174949 -0.17725426 -0.03603006 0.03409255 -0.1879885 0.03505005\n 0.04937597 0.00329883 -0.01896965 -0.00677846 0.0996637 0.10273074\n -0.03806393 -0.14637196 0.15648144 -0.23035409 -0.05747294 0.03025337\n -0.0691918 -0.11424079 -0.28547999 0.05400954 0.4612399 0.20551455\n -0.1205992 0.10039085 -0.02485273 -0.08657033 0.15424132 0.02397859\n -0.10445568 0.06970545 -0.08628456 0.10466914 0.15395048 0.03581595\n -0.06539053 0.2473422 0.02394313 0.01033761 0.12121034 0.07658306\n -0.15766957 -0.04047695 -0.17851622 -0.08721714 0.14192414 0.04055045\n 0.01483513 0.19600785 -0.14814621 0.20973045 0.02028378 -0.06801224\n -0.08009423 -0.02115281 -0.14955129 0.01807878 0.1297669 -0.2507216\n 0.11424468 0.11775573 -0.05532342 0.11031963 0.10643894 -0.02885438\n 0.03168463 -0.0032694 -0.15598211 -0.09769975 0.07611469 -0.02105711\n 0.09928153 0.03357534]\n')

      the /n will be included while fetch the encoding and also the encoding data becomes the string..i cannot recover the original data which m inserted ...
      according to python library i want to compair two encodings so becoz of /n and the data is in string icannot compair two encoding...i want this type of encoding while fetch from mongodb
      [-0.0810571 0.07765304 -0.01207364 -0.07887193 -0.10862262 0.00894677
      0.02332557 -0.13491267 0.17760251 -0.05169698 0.14168473 -0.02124487
      -0.18840104 -0.00166624 -0.04524321 0.05642941 -0.20851628 -0.11587431
      -0.06982738 -0.09224549 0.07435957 0.05051775 -0.00907151 0.06328857
      -0.21342427 -0.28789386 -0.16309851 -0.0865657 0.15885921 -0.1180099
      -0.02833412 0.05563367 -0.20987368 -0.08260232 0.01715455 0.03688456
      -0.0463421 -0.07057426 0.19063213 0.06713615 -0.15279283 0.05829819
      0.08128895 0.29696086 0.22681116 0.09677196 -0.02023378 -0.0361901
      0.09358779 -0.23957716 0.15015952 0.13825837 0.00492278 0.06615157
      0.1174949 -0.17725426 -0.03603006 0.03409255 -0.1879885 0.03505005
      0.04937597 0.00329883 -0.01896965 -0.00677846 0.0996637 0.10273074
      -0.03806393 -0.14637196 0.15648144 -0.23035409 -0.05747294 0.03025337
      -0.0691918 -0.11424079 -0.28547999 0.05400954 0.4612399 0.20551455
      -0.1205992 0.10039085 -0.02485273 -0.08657033 0.15424132 0.02397859
      -0.10445568 0.06970545 -0.08628456 0.10466914 0.15395048 0.03581595
      -0.06539053 0.2473422 0.02394313 0.01033761 0.12121034 0.07658306
      -0.15766957 -0.04047695 -0.17851622 -0.08721714 0.14192414 0.04055045
      0.01483513 0.19600785 -0.14814621 0.20973045 0.02028378 -0.06801224
      -0.08009423 -0.02115281 -0.14955129 0.01807878 0.1297669 -0.2507216
      0.11424468 0.11775573 -0.05532342 0.11031963 0.10643894 -0.02885438
      0.03168463 -0.0032694 -0.15598211 -0.09769975 0.07611469 -0.02105711
      0.09928153 0.03357534]

            Assignee:
            shane.harvey@mongodb.com Shane Harvey
            Reporter:
            micky micky
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: