Git Product home page Git Product logo

vrpwrp's People

Contributors

ipazc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

vrpwrp's Issues

JSONDecodeError

Running this piece of code:

face_detection = FaceDetection()
frame = cv2.imread('image_file.jpg')
bounding_boxes = face_detection.analyze_pil(Image.fromarray(frame))  

Gives the following error (JSONDecodeError: Expecting value: line 1 column 1 (char 0)):

File "C:/Users/wsarguroh001/Downloads/Powai_Rainbow_Cropped.py", line 69, in <module>
    bounding_boxes = face_detection.analyze_pil(Image.fromarray(frame))
  File "C:\Users\wsarguroh001\AppData\Local\Continuum\anaconda3\lib\site-packages\vrpwrp\wrappers\face_detection.py", line 100, in analyze_pil
    return self.analyze_bytes(image_bytes)
  File "C:\Users\wsarguroh001\AppData\Local\Continuum\anaconda3\lib\site-packages\vrpwrp\wrappers\face_detection.py", line 48, in analyze_bytes
    response = self._request("PUT", data=image_bytes, is_binary=True)['bounding_boxes']
  File "C:\Users\wsarguroh001\AppData\Local\Continuum\anaconda3\lib\site-packages\vrpwrp\wrappers\APIWrapper.py", line 27, in _request
    return response.json()
  File "C:\Users\wsarguroh001\AppData\Local\Continuum\anaconda3\lib\site-packages\requests\models.py", line 892, in json
    return complexjson.loads(self.text, **kwargs)
  File "C:\Users\wsarguroh001\AppData\Local\Continuum\anaconda3\lib\site-packages\simplejson\__init__.py", line 517, in loads
    return _default_decoder.decode(s)
  File "C:\Users\wsarguroh001\AppData\Local\Continuum\anaconda3\lib\site-packages\simplejson\decoder.py", line 370, in decode
    obj, end = self.raw_decode(s)
  File "C:\Users\wsarguroh001\AppData\Local\Continuum\anaconda3\lib\site-packages\simplejson\decoder.py", line 400, in raw_decode
    return self.scan_once(s, idx=_w(s, idx).end())
  File "C:\Users\wsarguroh001\AppData\Local\Continuum\anaconda3\lib\site-packages\simplejson\scanner.py", line 79, in scan_once
    return _scan_once(string, idx)
  File "C:\Users\wsarguroh001\AppData\Local\Continuum\anaconda3\lib\site-packages\simplejson\scanner.py", line 70, in _scan_once
    raise JSONDecodeError(errmsg, string, idx)
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

It used to work just fine earlier. Also it works alright on another system but throws this error on mine. Tried uninstalling and reinstalling the wrapper but to no effect.

A higher version of requests lib should be required when installing this package

in an ubuntu 14.04, the default python requests lib is too low. It raises the following error:

print(dTraceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.4/dist-packages/dhub/datasets.py", line 38, in __init__
    self.refresh()
  File "/usr/local/lib/python3.4/dist-packages/dhub/datasets.py", line 111, in refresh
    self.datasets = {d['url_prefix']: dict(definition=d, token=self.token, token_info=self.token_info, server_info=self.server_info, owner=self) for d in self._get_json("datasets")}
  File "/usr/local/lib/python3.4/dist-packages/dhub/wrapper/api_wrapper.py", line 115, in _get_json
    return self.__do_json_request(requests.get, rel_url, extra_data, json_data).json()
  File "/usr/local/lib/python3.4/dist-packages/dhub/wrapper/api_wrapper.py", line 50, in fun
    raise last_exception
  File "/usr/local/lib/python3.4/dist-packages/dhub/wrapper/api_wrapper.py", line 43, in fun
    result = func_wrap(obj, *args, **kwargs)
  File "/usr/local/lib/python3.4/dist-packages/dhub/wrapper/api_wrapper.py", line 100, in __do_json_request
    response = method("{}/{}".format(self.api_url, rel_url), json=json_data, params=data, timeout=TIMEOUT)
  File "/usr/lib/python3/dist-packages/requests/api.py", line 55, in get
    return request('get', url, **kwargs)
  File "/usr/lib/python3/dist-packages/requests/api.py", line 44, in request
    return session.request(method=method, url=url, **kwargs)
TypeError: request() got an unexpected keyword argument 'json'

it would be a good idea to require at least requests-2.18.4

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.