Bloodevil / sony_camera_api

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

An error has occurred! #61

Open KeqiWangSXuniversity opened 5 years ago

KeqiWangSXuniversity commented 5 years ago

In [1]: import pysony Traceback (most recent call last):

File "C:\Users*\IPython\core\interactiveshell.py", line 2910, in run_code exec(code_obj, self.user_global_ns, self.user_ns)

File "", line 1, in import pysony

File "C:*\Anaconda3\lib\site-packages\pysony.py", line 195 print "[WORN] liveview is not a dict type" ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(print "[WORN] liveview is not a dict type")?

bjmc commented 5 years ago

In Python3, print() is a function, not a keyword, so you have to call it like print("hello world")

KeqiWangSXuniversity commented 5 years ago

This error occurred in the pysony file. Should I modify the code in pysony? I looked at the code in the pysony file, where all print functions are in python2 format.

bjmc commented 5 years ago

Maybe you have an older version? I made some Python3-compatibility changes a few months back.

If there's a print statement I missed that's still a problem in the current version of the develop branch, then a PR would be welcome. :slightly_smiling_face:

raza-elahi commented 5 years ago

pysony 0.1.11 from pypi has it .... develop and master branches are clean

bjmc commented 5 years ago

Maybe @Bloodevil will be so kind as to make another release when she has time. In the meantime, you can install directly from github (I don't know how it works with Anaconda, though)

raza-elahi commented 4 years ago

download files, activate conda environment, cd into the folder and run ''' pip install . '''

Bloodevil commented 4 years ago

@bjmc thanks for cool explain I'll update soon. I was so lazy these days...

bobsbeenjamin commented 4 years ago

download files, activate conda environment, cd into the folder and run ''' pip install . '''

This worked for me. Thanks. Now waiting for the new version to show up in PyPI.

xtile commented 2 years ago

The same error appeared for me with the current pysony installed via pypi and python 3.8.

pysony.py, installed to dist-packages seems to be really outdated (it says 0.1.11).