Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An error has occurred! #61

Open
KeqiWangSXuniversity opened this issue Aug 20, 2019 · 9 comments
Open

An error has occurred! #61

KeqiWangSXuniversity opened this issue Aug 20, 2019 · 9 comments

Comments

@KeqiWangSXuniversity
Copy link

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
Copy link
Contributor

bjmc commented Aug 20, 2019

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

@KeqiWangSXuniversity
Copy link
Author

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
Copy link
Contributor

bjmc commented Aug 21, 2019

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. 🙂

@raza-elahi
Copy link

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

@bjmc
Copy link
Contributor

bjmc commented Sep 2, 2019

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
Copy link

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

@Bloodevil
Copy link
Owner

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

@bobsbeenjamin
Copy link

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
Copy link

xtile commented Dec 14, 2021

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants