Bloodevil / sony_camera_api

sony camera remote api
http://developer.sony.com/develop/cameras/
MIT License
245 stars 60 forks source link

Unable to 'setLiveviewFrameInfo()' #19

Closed mungewell closed 8 years ago

mungewell commented 8 years ago

` $ python Python 2.7.9 (default, Apr 2 2015, 15:34:55) [GCC 4.9.2] on linux2 Type "help", "copyright", "credits" or "license" for more information.

import pysony camera = pysony.SonyAPI(QX_ADDR='http://192.168.122.1:8080/') camera.setLiveviewFrameInfo([{"frameInfo": True}]) Trying.. {"version": "1.0", "params": [], "method": "getAvailableApiList", "id": 1} Traceback (most recent call last): File "", line 1, in File "build/bdist.linux-i686/egg/pysony.py", line 229, in setLiveviewFrameInfo File "build/bdist.linux-i686/egg/pysony.py", line 168, in _cmd File "build/bdist.linux-i686/egg/pysony.py", line 146, in _truefalse AttributeError: 'dict' object has no attribute 'lower' `

mungewell commented 8 years ago

screenshot_2016-03-15_21-17-57

https://github.com/mungewell/sony_camera_api/tree/frame_info

Start with $ python src/example/pyLiveView.py -g -i

Bloodevil commented 8 years ago

Thanks for reporting. I fixed this bug like below:

    for x in param:
        if type(x) != str:
            params.append(x)
        else:
            if x.lower() == 'true':
                params.append(True)
            elif x.lower() == 'false':
                params.append(False)
            else:
                params.append(x)